Downgrade to pytest-django 3.8.0 for now (#23566)

We'll upgrade this again along with pytest once pytest-dev/pytest#6925 is resolved.

Also, it looks like a flaky error in test class DB setup outside a transaction was mucking things up for the rest of the test shard. I didn't try to fix the flakiness, but this should at least limit the blast radius to just that test class. We really need to start using setUpTestData() more consistently.
This commit is contained in:
Jeremy Bowman
2020-04-01 14:17:27 -04:00
committed by GitHub
parent c8663fa518
commit 9ef0aa4880
4 changed files with 8 additions and 4 deletions

View File

@@ -27,8 +27,8 @@ class TestEnterpriseCourseEnrollmentCreateOldOrder(TestCase):
"""
@classmethod
def setUpClass(cls):
super(TestEnterpriseCourseEnrollmentCreateOldOrder, cls).setUpClass()
def setUpTestData(cls):
super(TestEnterpriseCourseEnrollmentCreateOldOrder, cls).setUpTestData()
UserFactory(username=TEST_ECOMMERCE_WORKER)
cls.enrollment_count = 30
cls._create_enterprise_course_enrollments(30)

View File

@@ -67,6 +67,10 @@ path<13.2.0
# BOM-1430: pytest 5.4.0 breaks reporting sometimes: https://github.com/pytest-dev/pytest/issues/6925
pytest<5.4.0
# pytest-django 3.9.0 has a fix for pytest 5.4.0+ that breaks cleanup after failed tests in earlier pytest versions
# https://github.com/pytest-dev/pytest-django/issues/824
pytest-django<3.9.0
# Upgrading to 2.5.3 on 2020-01-03 triggered "'tzlocal' object has no attribute '_std_offset'" errors in production
python-dateutil==2.4.0

View File

@@ -244,7 +244,7 @@ pyrsistent==0.16.0 # via jsonschema
pysrt==1.1.2 # via -r requirements/edx/testing.txt, edxval
pytest-attrib==0.1.3 # via -r requirements/edx/testing.txt
pytest-cov==2.8.1 # via -r requirements/edx/testing.txt
pytest-django==3.9.0 # via -r requirements/edx/testing.txt
pytest-django==3.8.0 # via -r requirements/edx/testing.txt
pytest-forked==1.1.3 # via -r requirements/edx/testing.txt, pytest-xdist
pytest-json-report==1.2.1 # via -r requirements/edx/testing.txt
pytest-metadata==1.8.0 # via -r requirements/edx/testing.txt, pytest-json-report

View File

@@ -232,7 +232,7 @@ pyquery==1.4.1 # via -r requirements/edx/testing.in
pysrt==1.1.2 # via -r requirements/edx/base.txt, edxval
pytest-attrib==0.1.3 # via -r requirements/edx/testing.in
pytest-cov==2.8.1 # via -r requirements/edx/testing.in
pytest-django==3.9.0 # via -r requirements/edx/testing.in
pytest-django==3.8.0 # via -r requirements/edx/testing.in
pytest-forked==1.1.3 # via pytest-xdist
pytest-json-report==1.2.1 # via -r requirements/edx/testing.in
pytest-metadata==1.8.0 # via pytest-json-report