Skip to content

Commit c1b202a

Browse files
committed
different approach in 18 listings
1 parent 3d20133 commit c1b202a

File tree

4 files changed

+8
-9
lines changed

4 files changed

+8
-9
lines changed

chapter_18_spiking_custom_auth.asciidoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1245,19 +1245,19 @@ I may not be able to see you, but the Testing Goat can!
12451245
[role="dofirst-ch18l037"]
12461246
[subs="specialcharacters,macros"]
12471247
----
1248-
$ pass:quotes[*rm src/accounts/migrations/0002_token.py*]
12491248
$ pass:quotes[*python src/manage.py makemigrations*]
12501249
Migrations for 'accounts':
12511250
src/accounts/migrations/0002_token.py
12521251
- Create model Token
12531252
$ pass:quotes[*python src/manage.py test accounts*]
12541253
AttributeError: 'Token' object has no attribute 'uid'. Did you mean: 'id'?
1254+
$ pass:quotes[*rm src/accounts/migrations/0002_token.py*]
12551255
----
12561256

12571257

12581258
Eventually you should get to this code...
12591259

1260-
[role="sourcecode dofirst-ch18l038-1"]
1260+
[role="sourcecode dofirst-ch18l038-0"]
12611261
.src/accounts/models.py (ch18l038)
12621262
====
12631263
[source,python]

pygments-default.css

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
1-
pre { line-height: 125%; }
2-
td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
3-
span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
4-
td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
5-
span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
61
pre.pygments .hll { background-color: #ffffcc }
72
pre.pygments { background: #f8f8f8; }
83
pre.pygments .tok-c { color: #3D7B7B; font-style: italic } /* Comment */
@@ -17,6 +12,7 @@ pre.pygments .tok-c1 { color: #3D7B7B; font-style: italic } /* Comment.Single */
1712
pre.pygments .tok-cs { color: #3D7B7B; font-style: italic } /* Comment.Special */
1813
pre.pygments .tok-gd { color: #A00000 } /* Generic.Deleted */
1914
pre.pygments .tok-ge { font-style: italic } /* Generic.Emph */
15+
pre.pygments .tok-ges { font-weight: bold; font-style: italic } /* Generic.EmphStrong */
2016
pre.pygments .tok-gr { color: #E40000 } /* Generic.Error */
2117
pre.pygments .tok-gh { color: #000080; font-weight: bold } /* Generic.Heading */
2218
pre.pygments .tok-gi { color: #008400 } /* Generic.Inserted */

tests/test_chapter_18_spiking_custom_auth.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,16 @@ def test_listings_and_commands_and_output(self):
2020
# skips
2121
self.skip_with_check(28, "switch back to main") # comment
2222
self.skip_with_check(30, "remove any trace") # comment
23+
# self.skip_with_check(70, "rm src/accounts/migrations/0002_token.py")
24+
# self.skip_with_check(71, "python src/manage.py makemigrations")
25+
# self.skip_with_check(72, "Migrations for")
2326

2427
# prep
2528
self.start_with_checkout()
2629
self.prep_database()
2730

2831
# hack fast-forward
29-
skip = False
32+
skip = True
3033
if skip:
3134
self.pos = 38
3235
self.sourcetree.run_command(

0 commit comments

Comments
 (0)