In this video, implement a new URL and template to display your hash objects.
- [Narrator] We've created a new test, … Test Viewing Hash and it's currently failing … like we expected it would. … Let's go ahead and write the code … to make this now pass. … Step number one for us is because we have a new URL, … let's move into our urls.py and we're … going to add a new path here that says, … if someone goes to hash, … slash … and then they insert some sort of hash and with this … we're going to say, okay if this is some type of string, … let's give it the name hash, … then we want to pass this forward to the … views dot hash function. … And we'll go ahead and specify the name of this … to just be hash. … We'll add our ending comma there. … So, that's all the code that we need for our URLs. … Now the next place that we need to move to … is to our views. … So, what we want to do is create a new function … if someone is going to see a hash. … So we're going to say def hash and put inside of here … not only just the request, … but we also want to have that hash parameter …
- 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.