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

Popular posts from this blog

apache - PHP Soap issue while content length is larger -

asynchronous - Python asyncio task got bad yield -

javascript - Complete OpenIDConnect auth when requesting via Ajax -