diff --git a/appendix_V_bdd_tools.asciidoc b/appendix_bdd.asciidoc similarity index 96% rename from appendix_V_bdd_tools.asciidoc rename to appendix_bdd.asciidoc index eefc34e2..d493fdd0 100644 --- a/appendix_V_bdd_tools.asciidoc +++ b/appendix_bdd.asciidoc @@ -67,7 +67,7 @@ $ *tree features* features ├── my_lists.feature └── steps -    └── my_lists.py + └── my_lists.py ---- @@ -190,7 +190,7 @@ Generating Placeholder Steps When we run `behave`, it helpfully tells us about all the steps we need to implement: -[role="sourcecode small-code"] +[role="small-code"] [subs="specialcharacters,quotes"] ---- $ *python manage.py behave* @@ -254,7 +254,6 @@ the server-side version, for example, although it would be easy to re-add later). [role="sourcecode small-code"] -[role="sourcecode"] .features/steps/my_lists.py [source,python] ---- @@ -417,7 +416,7 @@ def step_impl(context, first_item_text): Now we can run it and see our first expected failure: -[role="sourcecode small-code"] +[role="small-code"] [subs="specialcharacters,macros"] ---- $ pass:quotes[*./manage.py behave*] diff --git a/atlas.json b/atlas.json index 3f1b7e16..b3945f0c 100644 --- a/atlas.json +++ b/atlas.json @@ -40,7 +40,7 @@ "appendix_Django_Class-Based_Views.asciidoc", "appendix_III_provisioning_with_ansible.asciidoc", "appendix_IV_testing_migrations.asciidoc", - "appendix_V_bdd_tools.asciidoc", + "appendix_bdd.asciidoc", "appendix_VI_rest_api.asciidoc", "appendix_VII_DjangoRestFramework.asciidoc", "appendix_IX_cheat_sheet.asciidoc", diff --git a/book.asciidoc b/book.asciidoc index c48fd34d..4eb5a624 100644 --- a/book.asciidoc +++ b/book.asciidoc @@ -53,7 +53,7 @@ include::appendix_I_PythonAnywhere.asciidoc[] include::appendix_Django_Class-Based_Views.asciidoc[] include::appendix_III_provisioning_with_ansible.asciidoc[] include::appendix_IV_testing_migrations.asciidoc[] -include::appendix_V_bdd_tools.asciidoc[] +include::appendix_bdd.asciidoc[] include::appendix_VI_rest_api.asciidoc[] include::appendix_VII_DjangoRestFramework.asciidoc[] include::appendix_IX_cheat_sheet.asciidoc[] diff --git a/copy_html_to_site_and_print_toc.py b/copy_html_to_site_and_print_toc.py index 413ee55a..aaa88637 100755 --- a/copy_html_to_site_and_print_toc.py +++ b/copy_html_to_site_and_print_toc.py @@ -44,7 +44,7 @@ "appendix_Django_Class-Based_Views.html", "appendix_III_provisioning_with_ansible.html", "appendix_IV_testing_migrations.html", - "appendix_V_bdd_tools.html", + "appendix_bdd.html", "appendix_VI_rest_api.html", "appendix_VII_DjangoRestFramework.html", "appendix_IX_cheat_sheet.html", diff --git a/rename-chapter.sh b/rename-chapter.sh index 2d412c25..1be1f4f2 100755 --- a/rename-chapter.sh +++ b/rename-chapter.sh @@ -12,7 +12,7 @@ git mv $OLD_CHAPTER.asciidoc $NEW_NAME.asciidoc git mv tests/test_$OLD_CHAPTER.py tests/test_$NEW_NAME.py mkdir source/$NEW_NAME -# git mv source/$OLD_CHAPTER/superlists source/$NEW_NAME/superlists +git mv source/$OLD_CHAPTER/superlists source/$NEW_NAME/superlists cd source/$NEW_NAME/superlists && git checkout -b $NEW_NAME && cd ../../.. sed -i s/$OLD_CHAPTER/$NEW_NAME/g .travis.yml atlas.json book.asciidoc copy_html_to_site_and_print_toc.py tests/*.py diff --git a/tests/test_appendix_V_bdd_tools.py b/tests/test_appendix_bdd.py similarity index 72% rename from tests/test_appendix_V_bdd_tools.py rename to tests/test_appendix_bdd.py index a31122ea..ef4bb9a6 100644 --- a/tests/test_appendix_V_bdd_tools.py +++ b/tests/test_appendix_bdd.py @@ -5,8 +5,8 @@ class AppendixIITest(ChapterTest): - chapter_name = 'appendix_Django_Class-Based_Views' - previous_chapter = 'chapter_advanced_forms' + chapter_name = 'appendix_bdd' + previous_chapter = 'chapter_outside_in' def test_listings_and_commands_and_output(self): self.parse_listings() @@ -14,9 +14,9 @@ def test_listings_and_commands_and_output(self): #self.prep_virtualenv() # sanity checks - self.assertEqual(self.listings[0].type, 'code listing currentcontents') - self.assertEqual(self.listings[1].type, 'code listing with git ref') - self.assertEqual(self.listings[2].type, 'code listing with git ref') + self.assertEqual(self.listings[0].type, 'other command') + self.assertEqual(self.listings[4].type, 'tree') + self.assertEqual(self.listings[6].type, 'diff') # skips #self.skip_with_check(22, 'switch back to master') # comment