我有一个Django项目与生产夹具和测试夹具。如何使测试夹具仅在运行测试时加载?
发布于 2014-12-23 11:05:03
只需将其放入testcase类的fixtures属性中即可。如下所示:
class AnimalTestCase(TestCase): fixtures = ['mammals.json', 'birds']
文档可以找到这里
https://stackoverflow.com/questions/27618947
相似问题