diff --git a/lms/djangoapps/commerce/management/commands/tests/test_create_orders_for_old_enterprise_course_enrollmnet.py b/lms/djangoapps/commerce/management/commands/tests/test_create_orders_for_old_enterprise_course_enrollmnet.py
index 1e741eb1d42ebe7b9b0dfe04cfe2c8f50078d651..1997a49cfed1877ec0d7f5d776e93fc246645d33 100644
--- a/lms/djangoapps/commerce/management/commands/tests/test_create_orders_for_old_enterprise_course_enrollmnet.py
+++ b/lms/djangoapps/commerce/management/commands/tests/test_create_orders_for_old_enterprise_course_enrollmnet.py
@@ -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)
diff --git a/requirements/constraints.txt b/requirements/constraints.txt
index 39d94e77bf4fc3bf4fd3cfa8247325410dc7c76e..6abe83b8fe4ca86bb1b1fac8da9fa27725cb7e02 100644
--- a/requirements/constraints.txt
+++ b/requirements/constraints.txt
@@ -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
 
diff --git a/requirements/edx/development.txt b/requirements/edx/development.txt
index 9110bd6c41f85ffd9472708a0c1117c726c33a32..ede4ef3acf264df336c5158480a97c9e70fd53f5 100644
--- a/requirements/edx/development.txt
+++ b/requirements/edx/development.txt
@@ -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
diff --git a/requirements/edx/testing.txt b/requirements/edx/testing.txt
index 0f9063ef7b3f62f8f65b6aaefe9e04d25dd3e0dd..9cf8c224f1241e43afaa29b3c05e4fc7719a2b7a 100644
--- a/requirements/edx/testing.txt
+++ b/requirements/edx/testing.txt
@@ -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