Skip to content

Commit b238b15

Browse files
committed
Respect integrity constraints
test_data.json contains references to eric.json
1 parent 9ab3ea7 commit b238b15

File tree

5 files changed

+10
-9
lines changed

5 files changed

+10
-9
lines changed

readthedocs/rtd_tests/tests/test_builds.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -380,10 +380,10 @@ def test_get_env_vars(self):
380380

381381
class BuildModelTests(TestCase):
382382

383-
fixtures = ['test_data']
383+
fixtures = ['test_data', 'eric']
384384

385385
def setUp(self):
386-
self.eric = User(username='eric')
386+
self.eric = User.objects.get(username='eric')
387387
self.eric.set_password('test')
388388
self.eric.save()
389389

readthedocs/rtd_tests/tests/test_doc_builder.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
class SphinxBuilderTest(TestCase):
2525

26-
fixtures = ['test_data']
26+
fixtures = ['test_data', 'eric']
2727

2828
def setUp(self):
2929
self.project = Project.objects.get(slug='pip')

readthedocs/rtd_tests/tests/test_doc_building.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
class TestLocalBuildEnvironment(TestCase):
4646

4747
"""Test execution and exception handling in environment."""
48-
fixtures = ['test_data']
48+
fixtures = ['test_data', 'eric']
4949

5050
def setUp(self):
5151
self.project = Project.objects.get(slug='pip')
@@ -363,7 +363,7 @@ class TestDockerBuildEnvironment(TestCase):
363363

364364
"""Test docker build environment."""
365365

366-
fixtures = ['test_data']
366+
fixtures = ['test_data', 'eric']
367367

368368
def setUp(self):
369369
self.project = Project.objects.get(slug='pip')
@@ -1448,7 +1448,7 @@ def test_install_user_requirements_conda(self, checkout_path):
14481448

14491449

14501450
class AutoWipeEnvironmentBase:
1451-
fixtures = ['test_data']
1451+
fixtures = ['test_data', 'eric']
14521452
build_env_class = None
14531453

14541454
def setUp(self):

readthedocs/rtd_tests/tests/test_footer.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,8 @@ def test_not_show_edit_on_github(self):
148148
PUBLIC_DOMAIN_USES_HTTPS=True,
149149
)
150150
class TestVersionCompareFooter(TestCase):
151-
fixtures = ['test_data']
151+
152+
fixtures = ['test_data', 'eric']
152153

153154
def setUp(self):
154155
self.pip = Project.objects.get(slug='pip')
@@ -267,7 +268,7 @@ def test_highest_version_without_tags(self):
267268

268269

269270
class TestFooterPerformance(APITestCase):
270-
fixtures = ['test_data']
271+
fixtures = ['test_data', 'eric']
271272
url = '/api/v2/footer_html/?project=pip&version=latest&page=index&docroot=/'
272273
factory = APIRequestFactory()
273274

readthedocs/rtd_tests/tests/test_managers.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,7 @@ def test_api_user(self):
347347

348348
class TestHTMLFileManager(TestCase):
349349

350-
fixtures = ['test_data']
350+
fixtures = ['test_data', 'eric']
351351

352352
def setUp(self):
353353
self.user = User.objects.create(username='test_user', password='test')

0 commit comments

Comments
 (0)