Django: Getting Started Transcripts
Chapter: Django ORM and Databases
Lecture: Test setup

Login or purchase this course to watch this video and the rest of the course contents.
0:00 I've pre created a test file here with the basic test definition. First off, I'm going to write a little helper method.
0:11 This is just a quick debug method that prints some info to the screen. It will help you understand the state of things at each step in the test script
0:34 Remember that Django uses a clean database each time the test suite is run, unless you do something about it, it will be an empty database.
0:42 This setup method gets called before the execution of each test method. My setup has a print statement to tell you that setup is running.
0:50 Again, so you can see this test in action. Then it creates an author named McTest of the clan McTest, of course, and a book on testing how appropriate.

Talk Python's Mastodon Michael Kennedy's Mastodon