@@ -85,29 +85,28 @@ At this point your directory tree should look like this:
85
85
│ ├── __init__.py
86
86
│ └── tests.py
87
87
├── lists
88
+ │ ├── __init__.py
89
+ │ ├── __pycache__
88
90
│ ├── admin.py
89
91
│ ├── apps.py
90
- │ ├── __init__.py
91
92
│ ├── migrations
92
93
│ │ ├── 0001_initial.py
93
94
│ │ ├── 0002_item_text.py
94
95
│ │ ├── __init__.py
95
96
│ │ └── __pycache__
96
97
│ ├── models.py
97
- │ ├── __pycache__
98
98
│ ├── templates
99
99
│ │ └── home.html
100
100
│ ├── tests.py
101
101
│ └── views.py
102
102
├── manage.py
103
- ├── superlists
104
- │ ├── __init__.py
105
- │ ├── __pycache__
106
- │ ├── settings.py
107
- │ ├── urls.py
108
- │ └── wsgi.py
109
- └── virtualenv
110
- ├── [...]
103
+ └── superlists
104
+ ├── __init__.py
105
+ ├── __pycache__
106
+ ├── asgi.py
107
+ ├── settings.py
108
+ ├── urls.py
109
+ └── wsgi.py
111
110
----
112
111
113
112
'functional_tests.py' is gone, and has turned into 'functional_tests/tests.py'.
@@ -150,7 +149,7 @@ Next, instead of hardcoding the visit to localhost port 8000,
150
149
====
151
150
[source,python]
152
151
----
153
- def test_can_start_a_list_and_retrieve_it_later (self):
152
+ def test_can_start_a_todo_list (self):
154
153
# Edith has heard about a cool new online to-do app. She goes
155
154
# to check out its homepage
156
155
self.browser.get(self.live_server_url)
@@ -160,6 +159,9 @@ Next, instead of hardcoding the visit to localhost port 8000,
160
159
We can also remove the `if __name__ == '__main__'` from the end if we want,
161
160
since we'll be using the Django test runner to launch the FT.
162
161
162
+
163
+ TODO -- FIXES FROM HERE
164
+
163
165
Now we are able to run our functional tests using the Django test runner, by
164
166
telling it to run just the tests for our new `functional_tests` app:
165
167
@@ -171,12 +173,12 @@ Found 1 test(s).
171
173
System check identified no issues (0 silenced).
172
174
F
173
175
======================================================================
174
- FAIL: test_can_start_a_list_and_retrieve_it_later (functional_tests.tests.NewVi
175
- sitorTest.test_can_start_a_list_and_retrieve_it_later )
176
+ FAIL: test_can_start_a_todo_list (functional_tests.tests.NewVi
177
+ sitorTest.test_can_start_a_todo_list )
176
178
---------------------------------------------------------------------
177
179
Traceback (most recent call last):
178
180
File "...goat-book/functional_tests/tests.py", line 59, in
179
- test_can_start_a_list_and_retrieve_it_later
181
+ test_can_start_a_todo_list
180
182
self.fail("Finish the test!")
181
183
AssertionError: Finish the test!
182
184
@@ -224,8 +226,8 @@ $ pass:quotes[*python manage.py test*]
224
226
Creating test database for alias 'default'...
225
227
......F
226
228
======================================================================
227
- FAIL: test_can_start_a_list_and_retrieve_it_later (functional_tests.tests.NewVi
228
- sitorTest.test_can_start_a_list_and_retrieve_it_later )
229
+ FAIL: test_can_start_a_todo_list (functional_tests.tests.NewVi
230
+ sitorTest.test_can_start_a_todo_list )
229
231
230
232
[...]
231
233
AssertionError: Finish the test!
@@ -481,12 +483,12 @@ Found 7 test(s).
481
483
System check identified no issues (0 silenced).
482
484
......F
483
485
======================================================================
484
- FAIL: test_can_start_a_list_and_retrieve_it_later (functional_tests.tests.NewVi
485
- sitorTest.test_can_start_a_list_and_retrieve_it_later )
486
+ FAIL: test_can_start_a_todo_list (functional_tests.tests.NewVi
487
+ sitorTest.test_can_start_a_todo_list )
486
488
---------------------------------------------------------------------
487
489
Traceback (most recent call last):
488
490
File "...goat-book/functional_tests/tests.py", line 68, in
489
- test_can_start_a_list_and_retrieve_it_later
491
+ test_can_start_a_todo_list
490
492
self.fail("Finish the test!")
491
493
AssertionError: Finish the test!
492
494
0 commit comments