【发布时间】:2014-02-04 10:36:47
【问题描述】:
我需要为我的 Django-App 编写一些测试。为此,我正在使用这样加载的固定装置:
from django.test import TestCase
class PermissionTest(TestCase):
fixtures = ['test_groups.json','test_users.json']
def setUp(self):
... some other stuff
现在我想知道在我的 tearDown-Method 中写什么来删除从我的装置生成的组和用户。还是自动删除?
def tearDown(self):
... what has to go here?
【问题讨论】: