【发布时间】:2018-09-22 17:21:20
【问题描述】:
Django 中是否有一个装饰器允许在不应用固定装置的情况下运行测试功能?
类似的东西:
from django.test import TestCase
class TestSomething(TestCase):
fixtures = ['test_fixture.json']
def test_with_fixture(self):
# test something with fixtures
@do_not_use_fixtures
def test_without_fixtures(self):
# test something without fixtures
【问题讨论】:
-
也许
test_without_fixtures属于不同的测试用例。 -
语义上没有
标签: django django-testing django-fixtures