Index

A

acceptance test (see functional tests/testing (FT))
acceptance tests, Fast Tests, Slow Tests, and Hot Lava
aesthetics (see layout and style)
agile movement in software development, Small Design When Necessary
Ajax, The Server Side: Custom Authentication, QUnit setup and teardown, Testing Ajax
ALLOWED_HOSTS, Switching DEBUG to False and Setting ALLOWED_HOSTS
Anderson, Ross, Wiring Up Our Form to Send a POST Request
Ansible, Further Reading, Provisioning with AnsibleMove Deployment out of Fabric and into Ansible
any function, Using Selenium to Test User Interactions, A Little More of Our Front Page
architectural solutions to test problems, Architectural Solutions
assertion messages, The Python Standard Library’s unittest Module, The Python Standard Library’s unittest Module, Passing Python Variables to Be Rendered in the Template, A Simple Mock to Unit Tests Our initialize Function
AssertionError, A Little More of Our Front Page
assertRegex, Implementing the New Design Using TDD
assertTemplateUsed, A Separate Template for Viewing Lists
assertTrue, A Little More of Our Front Page
asynchronous JavaScript, More Nested Callbacks! Testing Asynchronous CodeMore Nested Callbacks! Testing Asynchronous Code
authentication, User Authentication, Integrating Third-Party Plugins, and Mocking with JavaScript
backend, De-spiking Our Custom Authentication Backend: Mocking Out an Internet RequestThe get_user Method
customising, The Server Side: Custom AuthenticationThe Server Side: Custom Authentication, A Look at Our Spiked Login View
in Django, Checking the View Actually Logs the User In
login view, Checking the View Actually Logs the User InChecking the View Actually Logs the User In
minimum custom user model, A Minimal Custom User ModelUsers Are Authenticated
mocking (see mocks/mocking)
Mozilla Persona, Mozilla Persona (BrowserID)
pre-authentication, Skipping the Login Process by Pre-creating a SessionChecking It Works
testing logout, Finishing Off Our FT, Testing Logout
testing view, Testing Our View by Mocking Out authenticate
tests as documentation, Tests as Documentation
automation, in deployment, TDD and the Danger Areas of Deployment, Automating Deployment with FabricFurther Reading
(see also deployment)
automation, in provisioning, Further Reading

C

caching, Caching and Performance Testing
CI server (see continuous integration (CI))
class-based generic views, Django Class-Based ViewsTake-Home: Having Multiple, Isolated View Tests with Single Assertions Helps
class-based views, Django Class-Based Views
clean architecture, Ports and Adapters/Hexagonal/Clean Architecture
code smell, Three Strikes and Refactor, Saving the POST to the Database, Moving Validation Logic into a Form, Finishing Off Our FT, Testing Logout
collectstatic, What We Glossed Over: collectstatic and Other Static DirectoriesWhat We Glossed Over: collectstatic and Other Static Directories
comments, Using a Functional Test to Scope Out a Minimum Viable App, Implementing the New Design Using TDD
commits, Commit, Unit Testing in Django, urls.py, But How to Use That URL in the Form?
configuration management tools, Further Reading
(see also Fabric)
context managers, Unit Testing Model Validation and the self.assertRaises Context Manager
continuous integration (CI), Continuous Integration (CI)More Things to Do with a CI Server, Keep Your CI Builds Green
adding required plugins, Adding Required Plugins
best practices, More Things to Do with a CI Server
configuring Jenkins, Configuring Jenkins Security
debugging with screenshots, Taking ScreenshotsTaking Screenshots
installing Jenkins, Installing Jenkins
JavaScript tests, Running Our QUnit JavaScript Tests in Jenkins with PhantomJSAdding the Build Steps to Jenkins
project setup, Setting Up Our Project
Selenium race conditions, A Common Selenium Problem: Race ConditionsA Common Selenium Problem: Race Conditions
for staging server test automation, More Things to Do with a CI Server
virtual display setup, Setting Up a Virtual Display so the FTs Can Run HeadlessSetting Up a Virtual Display so the FTs Can Run Headless
contracts, implicit, Identifying Implicit Contracts
cookies, Checking the View Actually Logs the User In, Skipping the Login Process by Pre-creating a Session
Cross-Site Request Forgery (CSRF) error, Wiring Up Our Form to Send a POST Request
CSS (Cascading Style Sheets) framework, What to Functionally Test About Layout and Style, Prettification: Using a CSS Framework
(see also Bootstrap)
where Bootstrap won’t work, Using Our Own CSS
cutting corners, Testing Is Hard

D

data migrations, An Attempted Deploy to StagingConclusions
database deployment issues, TDD and the Danger Areas of Deployment
database location, Adjusting the Database Location
De-spiking, De-spiking, De-spiking Our Custom Authentication Backend: Mocking Out an Internet RequestThe get_user Method
debugging, Testing a Simple Home Page with Unit Tests, Wiring Up Our Form to Send a POST Request, The Server Side: Custom Authentication
Ajax, The Server Side: Custom Authentication
Django debug screen, Simple Nginx Configuration
improving error messages, Passing Python Variables to Be Rendered in the Template
in continuous integration, Taking ScreenshotsTaking Screenshots
in JavaScript, A Simple Mock to Unit Tests Our initialize Function
staging for, The Proof Is in the Pudding: Using Staging to Catch Final BugsFixing the Persona Bug
switching DEBUG to false, Switching DEBUG to False and Setting ALLOWED_HOSTS
screenshots, for debugging, Taking ScreenshotsTaking Screenshots
dependencies
and deployment, TDD and the Danger Areas of Deployment
mocking out, Testing Our View by Mocking Out authenticate
virtualenv, Creating a Virtualenv
deployment, The Deployment Chapter
adjusting database location, Adjusting the Database Location
automating, AutomatingAutomating, Automating Deployment with FabricFurther Reading
danger areas, TDD and the Danger Areas of Deployment
dependencies and, TDD and the Danger Areas of Deployment
deploying to live, Deploying to Live
further reading, Further Reading
key points, Automating
to live, Live Deploy
migrate, Creating the Database with migrate
Nginx, Simple Nginx ConfigurationSimple Nginx Configuration
overview, Automating
production-ready, Getting to a Production-Ready DeploymentSaving Our Changes: Adding Gunicorn to Our requirements.txt
vs. provisioning, Deploying Our Code Manually
sample script, Breakdown of a Fabric Script for Our DeploymentBreakdown of a Fabric Script for Our Deployment
saving progress, “Saving Your Progress”
staging, Staging Deploy, An Attempted Deploy to Staging
virtualenvs, Creating a VirtualenvCreating a Virtualenv
deployment testing, Testing Deployment Using a Staging Site“Saving Your Progress”
domain name for, Getting a Domain Name
manual provisioning for hosting, Manually Provisioning a Server to Host Our SiteUsing the FT to Confirm the Domain Works and Nginx Is Running
overview, TDD and the Danger Areas of Deployment
design (see layout and style)
Django, Obey the Testing Goat! Do Nothing Until You Have a Test
admin site, The Django Admin Site
apps, Our First Django App, and Our First Unit Test
authentication in, The Server Side: Custom AuthenticationThe Server Side: Custom Authentication, Checking the View Actually Logs the User In
class-based views, Django Class-Based ViewsTake-Home: Having Multiple, Isolated View Tests with Single Assertions Helps
(see also class-based views)
collectstatic, What We Glossed Over: collectstatic and Other Static DirectoriesWhat We Glossed Over: collectstatic and Other Static Directories
custom user model, A Minimal Custom User ModelUsers Are Authenticated
debugging screen, Simple Nginx Configuration, Switching DEBUG to False and Setting ALLOWED_HOSTS
field types, The Test Gets Surprisingly Far
foreign key relationship, A Foreign Key Relationship
forms in (see forms)
FormView, The Home Page as a FormView
functional tests (FT) in (see functional tests/testing (FT))
and Gunicorn, Switching to Gunicorn
LiveServerTestCase, Ensuring Test Isolation in Functional Tests
management commands, A Django Management Command to Create SessionsGetting the FT to Run the Management Command on the Server, Wrap-Up
migrations, Our First Database MigrationA New Field Means a New Migration, Creating Our Production Database with migrateCreating Our Production Database with migrate, Deploying Our New Code
model adjustment in, Adjusting Our Models
model-layer validation, Using Model-Layer ValidationEnforcing Model Validation in view_list
Model-View-Controller (MVC), Django’s MVC, URLs, and View Functions
notifications, Notifications—Both on the Site and by Email
Object-Relational Mapper (ORM), The Django ORM and Our First ModelA New Field Means a New Migration
POST requests (see POST requests)
as PythonAnywhere app, Setting Up Django as a PythonAnywhere Web App
startproject, Getting Django Up and Running
static files in, Static Files in Django
static live server case, Switching to StaticLiveServerTestCase
template inheritance, Django Template InheritanceDjango Template Inheritance
templates, Rendering Items in the TemplateRendering Items in the Template, A Separate Template for Viewing Lists
test class in, A Test Class for New List Creation
test client, A New Test Class, A Test Class for New List Creation
test fixtures, Skipping the Login Process by Pre-creating a Session
TestCase, Unit Testing in Django
unit testing in, Unit Testing in Django
URLs in, Django’s MVC, URLs, and View Functionsurls.py, A New URL, A URL and View for New List Creation, Pointing Our Forms at the New URL, Each List Should Have Its Own URL, The Last New URL, But How to Use That URL in the Form?, A Final Refactor Using URL includes
validation quirk, A Django Quirk: Model Save Doesn’t Run Validation
view functions in, Django’s MVC, URLs, and View Functions, A New View Function, A URL and View for New List Creation, One More View to Handle Adding Items to an Existing ListThe Last New View, Moving Down One Layer to View Functions (the Controller)
and virtualenvs, Creating a VirtualenvCreating a Virtualenv
Django-BrowserID, Exploratory Coding, aka “Spiking”
documentation, tests as, Tests as Documentation
domain names, Getting a Domain Name
Don’t Test Constants rule, The “Don’t Test Constants” Rule, and Templates to the Rescue
double-loop TDD, Recap: The TDD Process, Finishing “My Lists”: Outside-In TDD
DRY (don’t repeat yourself), Three Strikes and Refactor, An Exercise for the Reader
duplicates, eliminating, Passing Python Variables to Be Rendered in the Template, Another FT for Duplicate ItemsA More Complex Form to Handle Uniqueness Validation

E

encryption, Client-Side Encryption
end-to-end test (see functional tests/testing (FT))
error messages, Test for Graceful Degradation
error pages, 404 and 500 Tests
evaluating third-party systems, De-spiking
expected failure, Using a Functional Test to Scope Out a Minimum Viable App, Commit
explicit waits, A Common Selenium Technique: Explicit Waits
exploratory coding, Exploring the Forms API with a Unit Test, Exploratory Coding, aka “Spiking”
(see also spiking)

F

Fabric, Further Reading, An Additional Hop via subprocess, Move Deployment out of Fabric and into Ansible
configuration, Trying It Out
installing, Automating Deployment with Fabric
sample deployment script, Breakdown of a Fabric Script for Our DeploymentBreakdown of a Fabric Script for Our Deployment
Fake XMLHttpRequest, QUnit setup and teardown, Testing Ajax
fixtures
in functional tests, Skipping the Login Process by Pre-creating a Session
in JavaScript tests, Using jQuery and the Fixtures Div
on staging server, Managing the Test Database on StagingAn Additional Hop via subprocess
foreign key relationship, A Foreign Key Relationship
forms
advanced, More Advanced FormsUsing the Existing List Item Form in the List View
autogeneration, Switching to a Django ModelForm
customising form field input, Exploring the Forms API with a Unit Test
experimenting with, Exploring the Forms API with a Unit Test
ModelForm, Switching to a Django ModelForm
save methods, Using the Form’s Own Save Method
simple, A Simple FormUsing the Form’s Own Save Method
thin views, Using the Form’s Own Save Method
tips for, Using the Form’s Own Save Method
using in views, Using the Form in Our ViewsA Helper Method for Several Short Tests
validation testing and customising, Testing and Customising Form Validation
Functional Core, Imperative Shell architecture, Functional Core, Imperative Shell
functional tests/testing (FT), Obey the Testing Goat! Do Nothing Until You Have a Test, Fast Tests, Slow Tests, and Hot Lava
automation of (see continuous integration (CI))
cleanup, Getting to the Minimum Viable SiteEnsuring Test Isolation in Functional Tests, Removing Now-Redundant Code and Tests, An FT with Multiple Users, and addCleanup
de-duplication, Wrap-Up
defining, Using a Functional Test to Scope Out a Minimum Viable App
for de-spiking, De-spiking
for duplicate items, Another FT for Duplicate ItemsA More Complex Form to Handle Uniqueness Validation
isolation in, Getting to the Minimum Viable SiteEnsuring Test Isolation in Functional Tests, A Final Refactor Using URL includes
in JavaScript, Building a JavaScript Unit Test for Our Desired FunctionalityJavascript Testing in the TDD Cycle
for layout and style, What to Functionally Test About Layout and StyleWhat to Functionally Test About Layout and Style, Switching to Gunicorn, Splitting Functional Tests out into Many Files
multiple users, An FT with Multiple Users, and addCleanup, Extend the FT to a Second User, and the “My Lists” PageExtend the FT to a Second User, and the “My Lists” Page
pros and cons, Onwards!
in provisioning, Using the FT to Confirm the Domain Works and Nginx Is Running
running unit tests only, Running Just the Unit Tests
safeguards with, An Additional Hop via subprocess
splitting, Splitting Functional Tests out into Many Files
for staging sites, TDD and the Danger Areas of Deployment, As Always, Start with a Test
unittest module, Extending Our Functional Test Using the unittest ModuleCommit
vs. unit tests, Unit Tests, and How They Differ from Functional Tests, Test Fixtures, Logging, and Server-Side Debugging
in views, Using the Existing List Item Form in the List View

M

manage.py, Getting Django Up and Running, Unit Testing in Django, Our First Database Migration, Creating Our Production Database with migrate, What We Glossed Over: collectstatic and Other Static Directories
Meta, Switching to a Django ModelForm
meta-comments, Implementing the New Design Using TDD
migrate, Creating the Database with migrate
migrations, Our First Database MigrationA New Field Means a New Migration, Creating Our Production Database with migrateCreating Our Production Database with migrate, A Foreign Key Relationship, Deploying Our New Code, What to Do If You See a Database Error
(see also data migrations)
database, Testing Database MigrationsConclusions
deleting, A Foreign Key Relationship
testing, Testing Database MigrationsConclusions
minimum viable application, Using a Functional Test to Scope Out a Minimum Viable AppUsing a Functional Test to Scope Out a Minimum Viable App, Small Design When Necessary
MockMyID, De-spiking
mocks/mocking
callbacks, More Nested Callbacks! Testing Asynchronous CodeMore Nested Callbacks! Testing Asynchronous Code
checking call arguments, Checking Call Arguments
implicit contracts, Identifying Implicit Contracts
in JavaScript, User Authentication, Integrating Third-Party Plugins, and Mocking with JavaScript, Mocking: Who, Why, What?More Nested Callbacks! Testing Asynchronous Code
initialize function test, A Simple Mock to Unit Tests Our initialize FunctionA Simple Mock to Unit Tests Our initialize Function
Internet requests, De-spiking Our Custom Authentication Backend: Mocking Out an Internet RequestThe get_user Method
for isolation, A First Attempt at Using Mocks for IsolationUsing Mock side_effects to Check the Sequence of Events
mock library, Finishing Off Our FT, Testing Logout
Mock side_effects, Using Mock side_effects to Check the Sequence of Events
namespacing, Namespacing
in Outside-In TDD, A Decision Point: Whether to Proceed to the Next Layer with a Failing Test
in Python, Mocking in PythonChecking the View Actually Logs the User In
risks, The Moment of Truth (and the Risks of Mocking)
sinon.js, Using a sinon.js mock to check we call the API correctly
testing Django login, Checking the View Actually Logs the User In
model-layer validation, Using Model-Layer ValidationEnforcing Model Validation in view_list
changes to test, Rewriting the Old Model Test
enforcing, Enforcing Model Validation in view_list
errors in View, Surfacing Model Validation Errors in the ViewChecking Invalid Input Isn’t Saved to the Database
integrity errors, Some Integrity Errors Do Show Up on Save
POST requests, Django Pattern: Processing POST Requests in the Same View as Renders the FormEnforcing Model Validation in view_list
preventing duplicates, Preventing Duplicates at the Model Layer
refactoring, Refactoring Unit Tests into Several Files, Refactor: Transferring the new_item Functionality into view_listRefactor: Transferring the new_item Functionality into view_list
unit testing, Unit Testing Model Validation and the self.assertRaises Context ManagerA Django Quirk: Model Save Doesn’t Run Validation
at views level, Experimenting with Duplicate Item Validation at the Views Layer
Model-View-Controller (MVC), Django’s MVC, URLs, and View Functions, JavaScript MVC Frameworks
ModelForm, Switching to a Django ModelForm
Mozilla Persona, Mozilla Persona (BrowserID)
MVC frameworks, Django’s MVC, URLs, and View Functions, JavaScript MVC Frameworks

P

PaaS (Platform-as-a-Service), Choosing Where to Host Our Site
Page pattern, The Page PatternThe Page Pattern, An Exercise for the Reader
patch decorator, Testing Our View by Mocking Out authenticate, Finishing Off Our FT, Testing Logout
patching, Patching at the Class Level
payment systems, testing for, De-spiking
performance testing, Caching and Performance Testing
Persona, Mozilla Persona (BrowserID), De-spiking, Setting Up LoggingFixing the Persona Bug, Test for Graceful Degradation
PhantomJS, Running Our QUnit JavaScript Tests in Jenkins with PhantomJSAdding the Build Steps to Jenkins, Run Your Tests Against Different Browsers
Platform-as-a-Service (PaaS), Choosing Where to Host Our Site
POST requests, Using the Form in a View That Takes POST Requests
processing, Processing a POST Request on the Server, Django Pattern: Processing POST Requests in the Same View as Renders the FormEnforcing Model Validation in view_list
redirect after, Redirect After a POST
saving to database, Saving the POST to the DatabaseSaving the POST to the Database
sending, Wiring Up Our Form to Send a POST RequestWiring Up Our Form to Send a POST Request, A Separate Template for Viewing Lists
Postgres, Switch to Postgres
private key authentication, User Accounts, SSH, and Privileges
programming by wishful thinking, Designing Our API Using the Template, Final Step: Feeding Through the .name API from the Template
(see also Outside-In TDD)
property Decorator, Final Step: Feeding Through the .name API from the Template
provisioning, Manually Provisioning a Server to Host Our SiteUsing the FT to Confirm the Domain Works and Nginx Is Running
with Ansible, Provisioning with AnsibleMove Deployment out of Fabric and into Ansible
automation in, Further Reading
functional tests (FT) in, Using the FT to Confirm the Domain Works and Nginx Is Running
overview, Automating
vs. deployment, Deploying Our Code Manually
pure unit tests (see isolated tests)
py.test, Switch to Using py.test
Python
adding to Jenkins, Telling Jenkins where to find Python 3 and Xvfb
PythonAnywhere, Choosing Where to Host Our Site, PythonAnywhere

S

screenshots, Screenshots
scripts, automated, TDD and the Danger Areas of Deployment
secret key, Breakdown of a Fabric Script for Our Deployment
Security Engineering (Anderson), Wiring Up Our Form to Send a POST Request
security tests, Write Some Security Tests
sed (stream editor), Nginx and Gunicorn Config Using sed
Selenium, Obey the Testing Goat! Do Nothing Until You Have a Test
and JavaScript, A Few Things That Didn’t Make It
best practices, More Things to Do with a CI Server
in continuous integration, A Common Selenium Problem: Race ConditionsA Common Selenium Problem: Race Conditions
in continuous integration, First Build!
race conditions, Implementing the Selenium Interact/Wait Pattern
race conditions in, A Common Selenium Problem: Race ConditionsA Common Selenium Problem: Race Conditions
upgrading, Implementing the New Design Using TDD
for user interaction testing, Using Selenium to Test User InteractionsThe “Don’t Test Constants” Rule, and Templates to the Rescue
wait patterns, Implicit waits, A Common Selenium Technique: Explicit Waits, The Token Social Bit, the Page Pattern, and an Exercise for the Reader, Implementing the Selenium Interact/Wait Pattern
waits in, A Common Selenium Problem: Race ConditionsA Common Selenium Problem: Race Conditions, More Things to Do with a CI Server
server configuration, Automating
server options, Spinning Up a Server
servers, Manually Provisioning a Server to Host Our SiteUsing the FT to Confirm the Domain Works and Nginx Is Running
(see also staging server)
session key, Skipping the Login Process by Pre-creating a Session
sessions, Checking the View Actually Logs the User In
Shining Panda, Telling Jenkins where to find Python 3 and Xvfb
sinon.js, Using a sinon.js mock to check we call the API correctly, QUnit setup and teardown, Testing Ajax, More Nested Callbacks! Testing Asynchronous Code
skips, Skipping a Test
spiking, Exploratory Coding, aka “Spiking”Reverting Our Spiked Code, More Nested Callbacks! Testing Asynchronous Code
browser-ID protocol, The Browser-ID Protocol
de-spiking, De-spiking
frontend and JavaScript code, Frontend and JavaScript Code
logging, The Server Side: Custom Authentication
server-side authentication, The Server Side: Custom AuthenticationThe Server Side: Custom Authentication
with JavaScript, Exploratory Coding, aka “Spiking”
SQLite, Switch to Postgres
staging server
creating sessions, A Django Management Command to Create Sessions
debugging in, The Proof Is in the Pudding: Using Staging to Catch Final BugsFixing the Persona Bug
managing database on, Managing the Test Database on StagingChecking It Works
test automation with CI, More Things to Do with a CI Server
staging sites, TDD and the Danger Areas of Deployment, As Always, Start with a Test, Getting a Domain Name
static files, What to Functionally Test About Layout and Style, Static Files in Django, TDD and the Danger Areas of Deployment, Getting Nginx to Serve Static Files
static folder, site-wide, Housekeeping: A Site-Wide Static Files Folder
static live server case, Switching to StaticLiveServerTestCase
string representation, A Little Digression on Queryset Ordering and String Representations
string substitutions, Each List Should Have Its Own URL
style (see layout and style)
superlists, Starting a Git Repository
system boundaries, Ports and Adapters/Hexagonal/Clean Architecture
system tests, Fast Tests, Slow Tests, and Hot Lava

T

table styling, Table Styling
template inheritance, Django Template InheritanceDjango Template Inheritance
template inheritance hierarchy, A Quick Restructure of the Template Inheritance Hierarchy
template tag, Wiring Up Our Form to Send a POST Request
templates, Refactoring to Use a Template, Passing Python Variables to Be Rendered in the Template
rendering items in, Rendering Items in the TemplateRendering Items in the Template
separate, A Separate Template for Viewing Lists
test fixtures, Skipping the Login Process by Pre-creating a Session, Wrap-Up
test isolation, A Final Refactor Using URL includes, Test Isolation, and “Listening to Your Tests”Onwards!
cleanup after, Tidy Up: What to Keep from Our Integrated Test SuiteRemoving Redundant Code at the Forms Layer
collaborators, Thinking in Terms of CollaboratorsThinking in Terms of Collaborators
complexity in, Let Complexity Be Your Guide
forms layer, Moving Down to the Forms LayerKeep Listening to Your Tests: Removing ORM Code from Our Application
full isolation, Rewriting Our Tests for the View to Be Fully Isolated
interactions between layers, Thinking of Interactions Between Layers as “Contracts”
isolated vs. integrated tests, Conclusions: When to Write Isolated Versus Integrated Tests
mocks/mocking for, A First Attempt at Using Mocks for IsolationUsing Mock side_effects to Check the Sequence of Events
models layer, Finally, Moving Down to the Models LayerFinally, Moving Down to the Models Layer
ORM code, Moving Down to the Forms LayerKeep Listening to Your Tests: Removing ORM Code from Our Application, Onwards!
refactoring in, Listen to Your Tests: Ugly Tests Signal a Need to Refactor, Conclusions: When to Write Isolated Versus Integrated Tests
views layer, Revisiting Our Decision Point: The Views Layer Depends on Unwritten Models Code, A First Attempt at Using Mocks for IsolationThinking in Terms of Collaborators, Back to Views
test methods, The Python Standard Library’s unittest Module
test organisation, Using get_absolute_url for Redirects
test skips, Skipping a Test
test types, Onwards!, Fast Tests, Slow Tests, and Hot Lava
test-driven development (TDD)
advanced considerations in, Fast Tests, Slow Tests, and Hot LavaConclusion
and developer stupidity, Preventing Duplicates at the Model Layer
double-loop, Recap: The TDD Process, Finishing “My Lists”: Outside-In TDD
further reading on, Conclusion
Inside-Out, The Alternative: “Inside Out”
iterating towards new design, Iterating Towards the New Design
Java testing in, Javascript Testing in the TDD Cycle
justifications for, What Are We Doing with All These Tests?Programming Is like Pulling a Bucket of Water up from a Well
new design implementation with, Implementing the New Design Using TDDImplementing the New Design Using TDD
Outside-In, Finishing “My Lists”: Outside-In TDDFinal Step: Feeding Through the .name API from the Template
(see also Outside-In TDD)
process flowchart, Implementing the New Design Using TDD
process recap, Recap: The TDD ProcessRecap: The TDD Process
trivial tests, Programming Is like Pulling a Bucket of Water up from a WellProgramming Is like Pulling a Bucket of Water up from a Well
Working state to working state, Iterating Towards the New Design, But How to Use That URL in the Form?, A Final Refactor Using URL includes
testing best practices, Fast Tests, Slow Tests, and Hot Lava
Testing Goat, Obey the Testing Goat! Do Nothing Until You Have a Test, But How to Use That URL in the Form?, A Final Refactor Using URL includes, Testing Is Hard
tests, as documentation, Tests as Documentation
thin views, Using the Form’s Own Save Method
time.sleep, Wiring Up Our Form to Send a POST Request
tracebacks, At Last! We Actually Write Some Application Code!, Passing Python Variables to Be Rendered in the Template
triangulation, Passing Python Variables to Be Rendered in the Template

U

Ubuntu, Spinning Up a Server
unit tests
architectural solutions for, Architectural Solutions
context manager, Unit Testing Model Validation and the self.assertRaises Context Manager
desired features of, Synthesis: What Do We Want from Our Tests, Anyway?
in Django, Unit Testing in Django
for simple home page, Testing a Simple Home Page with Unit TestsThe Unit-Test/Code Cycle
vs. functional tests, Test Fixtures, Logging, and Server-Side Debugging
vs. functional tests (FT), Unit Tests, and How They Differ from Functional Tests
vs. integrated tests, The Django ORM and Our First Model
pros and cons of, Thesis: Unit Tests Are Superfast and Good Besides ThatBut All These Problems Can Be Overcome
refactoring, Refactoring Unit Tests into Several Files
unit-test/code cycle, The Unit-Test/Code CycleThe Unit-Test/Code Cycle
unittest, As Always, Start with a Test
Unix sockets, Switching to Using Unix Sockets
Upstart, Using Upstart to Make Sure Gunicorn Starts on Boot
URLs
capturing parameters in, Capturing Parameters from URLs
distinct, Each List Should Have Its Own URL
in Django, Django’s MVC, URLs, and View Functionsurls.py, A New URL, A URL and View for New List Creation, Pointing Our Forms at the New URL, Each List Should Have Its Own URL, The Last New URL, But How to Use That URL in the Form?
pointing forms to, Pointing Our Forms at the New URL
urls.py, urls.pyurls.py
user authentication (see authentication)
user creation, Creating a User if Necessary
user input, saving, Saving User InputCreating Our Production Database with migrate
user interaction testing, Using Selenium to Test User InteractionsThe “Don’t Test Constants” Rule, and Templates to the Rescue
user stories, Commit, Validation FT: Preventing Blank Items

Y

YAGNI, YAGNI!

Get Test-Driven Development with Python now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.