I am just scratching the surface of testing in Django. Here is my testing code, inside tests.py: class AdvertisingTests( TestCase ): def test_get_ad( self ): '''
Solution 1:
Django tests create empty temporaty database see docs, which will be destroyed after tests.
To prepopulate testing DB with data you can use setUp method:
Post a Comment for "Django Test Not Getting Model Object"