templates,
69 – 71 , 90test class in,
93test client,
88,
93test fixtures,
304TestCase,
23unit testing in,
23URLs in,
24 – 30,
88 , 94,
96,
102,
106,
108,
110validation quirk,
178view functions in,
24,
89 , 94,
105 – 108,
326and virtualenvs,
142 – 144Django-BrowserID,
243documentation, tests as,
296domain names,
135Don’t Test Constants rule,
40double-loop TDD,
47,
323DRY (don’t repeat yourself),
59,
396duplicates, eliminating,
58,
211 – 221E
encryption,
436end-to-end test (see functional tests/testing
(FT))
error messages,
435error pages,
434evaluating third-party systems,
252expected failure,
16 , 19explicit waits,
253exploratory coding,
195,
242(see also spiking)
F
Fabric,
167,
314,
426configuration,
163installing,
157sample deployment script,
158 – 161Fake XMLHttpRequest,
268fixtures
in functional tests,
303in JavaScript tests,
229on staging server,
311 – 317foreign key relationship,
99forms
advanced,
211 – 223autogeneration,
195customising form field input,
194experimenting with,
194ModelForm,
195save methods,
208simple,
193 – 210thin views,
210tips for,
210using in views,
198 – 207validation testing and customising,
196Fuctional Core, Imperative Shell architecture,
403functional tests/testing (FT),
5 , 398automation of (see continuous integration
(CI))
cleanup,
77 – 80 , 95,
387de-duplication,
320defining,
14for de-spiking,
251for duplicate items,
211 – 221isolation in,
77 – 80,
112in JavaScript,
232 – 234for layout and style,
115 – 118,
148,
173multiple users,
387,
393 – 394pros and cons,
364in provisioning,
139running unit tests only,
80safeguards with,
317splitting,
171for staging sites,
132,
133unittest module,
13 – 19vs. unit tests,
22 , 303in views,
223G
generator expression,
39GET requests,
198,
205get_user,
291Git
repository setup,
8 – 11reset --hard,
118tags,
166,
238global variables,
228greedy regular expressions,
106Gunicorn,
148 – 155,
165,
307,
425H
headless browsers,
372helper functions/methods,
59 , 172,
175,
206,
226,
350,
390 – 393hexagonal architecture,
403hosting options,
136Index
|
445