Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/sorting/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python pytest django中的重置_序列_Python_Django_Pytest - Fatal编程技术网

Python pytest django中的重置_序列

Python pytest django中的重置_序列,python,django,pytest,Python,Django,Pytest,我已经把我的问题发到网上了。但至少两周后它似乎不活跃。我决定在这里问我的问题 在我的测试中,我想使用 在最新的pytest django 3.8.0中,您可以使用@pytest.mark.django_db(transaction=True,reset_sequences=True)来使用reset_sequences。你可以在官方文件中找到它

我已经把我的问题发到网上了。但至少两周后它似乎不活跃。我决定在这里问我的问题

在我的测试中,我想使用

在最新的pytest django 3.8.0中,您可以使用
@pytest.mark.django_db(transaction=True,reset_sequences=True)
来使用reset_sequences。你可以在官方文件中找到它