when does the database is being destroy in django tests? -
i'm writing tests django app, , can't understand when
database destroyed..
in django website says being destroy "he test databases destroyed when tests have been executed."
i understand that, db destroyed when last test command in
the last test*.py file executed.
so wrote tests , have following:
usermethodstests(testcase): def test_get_full_name(self): create db objects in model x stuff on them (not deleting) def test_get_username(self): * empty line create more db objects in model x
but if write "print len(x.objects.all())" in * empty line,
it output 0, if db deleted..
so don't understand if when db destroy/deleted
can me?
Comments
Post a Comment