我已经把我的问题发到pytest-django上了。但至少两周内都不活跃。我决定在这里提问。
在我的测试中,我想使用sequence=True。
如何在pytest-django中做到这一点
pytest-django
发布于 2020-03-09 09:25:25
在最新的pytest-django 3.8.0中,您可以使用reset_sequences.执行@pytest.mark.django_db(transaction=True,reset_sequences=True)您可以在这正式文档中找到它。
@pytest.mark.django_db(transaction=True,reset_sequences=True)
https://stackoverflow.com/questions/47904245
相似问题