Django test database looks empty while test is running

前端 未结 2 1594
说谎
说谎 2020-12-31 05:11

I have a Django project that uses local PostgreSQL server. I\'m using a debugger to debug some weird bugs that I have. While the debugger is stopped on one of the tests, I t

2条回答
  •  时光说笑
    2020-12-31 05:56

    Django's TestCase is wrapping every test in its own transaction. So your database is not being used any time you do a request through ORM.

提交回复
热议问题