In this video, switch from function to unit tests and create your first unit test for URL routing.
- [Instructor] So we spent some time working … on functional tests, … it's now time to move on to unit tests. … And the reason for that is, in general, … you're usually going to write a functional test … that's something the user might do, … and then we use unit tests that help us … to write the code to get there. … Functional test first, … then some unit tests that help us to get … to ultimately passing that functional test. … I know, lots of different tests going on here, … but, as we move over into unit tests, … we're going to go ahead and comment out … this functional test case code. … So, let's go ahead and first just copy this class here. … We want to be able to copy this, … come down and paste, and just rename this to unit test case. … So going to go ahead and rename that UnitTestCase. … Then, I'm going to take all this code here, … select this, and Adam, if you go ahead … and hit Command and then / … it'll automatically comment it out for you. … With that all gone, we're going to focus …
- TDD philosophy
- Comparing functional and unit tests
- Writing a test in Selenium
- Writing a unit test
- Testing page data
- Hash testing
- Writing a test for user input
- Testing a POST request
- AJAX implementation
- TDD vs. testing after
Skill Level Intermediate
Deploying Django Apps: Make Your Site Go Livewith Nick Walter2h 43m Intermediate
Building RESTful Web APIs with Djangowith Rudolf Olah1h 9m Intermediate
What you should know1m 9s
1. Functional Tests
2. Unit Tests
3. Advanced Testing
Next steps1m 11s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.