2024-03-28 17:04:10 发布
网友
我有一个Django项目与生产夹具和测试夹具。如何使测试夹具只在运行测试时加载?你知道吗
您只需要将它放入testcase类的fixtures属性中。像这样:
class AnimalTestCase(TestCase): fixtures = ['mammals.json', 'birds']
文档可以找到here
您只需要将它放入testcase类的fixtures属性中。像这样:
文档可以找到here
相关问题 更多 >
编程相关推荐