我需要为我的Django应用程序编写一些测试。为此,我使用的夹具是这样加载的:
from django.test import TestCase
class PermissionTest(TestCase):
fixtures = ['test_groups.json','test_users.json']
def setUp(self):
... some other stuff
现在我想知道在我的tearDown方法中写些什么来删除从fixture中生成的组和用户。还是自动删除?在
^{pr2}$
Tags:
在运行每个测试之前,django的测试框架将负责删除加载的fixture。所以你不需要处理这个。在
从docs:
相关问题 更多 >
编程相关推荐