我正在将项目从django 1.11迁移到django2.2。我们有基于数据库的缓存,在不同的数据库上运行(不是默认的)。在运行测试时,我们得到以下错误: AssertionError: Database queries to 'cache' are not allowed in this test.Add 'cache' to users.tests.Us
我让django单元测试为测试创建了一个MariaDB数据库。我正在使用设置文件中的用户和密码访问数据库,并且一直收到这个错误:Type 'yes' if you would like to try deleting the test database 'test_x_django'; database exists") 这使得我每次运行单元测试时都要输入“yes”-