From 65a9ebb85635166ecd8ba2eefa2ba4356b839a1e Mon Sep 17 00:00:00 2001 From: Manuel Kaufmann Date: Tue, 15 May 2018 15:42:43 -0500 Subject: [PATCH] Force ALLOW_PRIVATE_REPOS=False for test case --- .../rtd_tests/tests/test_project_forms.py | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/readthedocs/rtd_tests/tests/test_project_forms.py b/readthedocs/rtd_tests/tests/test_project_forms.py index a8b87060a9e..70167458a9a 100644 --- a/readthedocs/rtd_tests/tests/test_project_forms.py +++ b/readthedocs/rtd_tests/tests/test_project_forms.py @@ -73,14 +73,15 @@ def test_import_repo_url(self): ('user@one-ssh.domain.com:22/_ssh/docs', True), ] + common_urls - for url, valid in public_urls: - initial = { - 'name': 'foo', - 'repo_type': 'git', - 'repo': url, - } - form = ProjectBasicsForm(initial) - self.assertEqual(form.is_valid(), valid, msg=url) + with override_settings(ALLOW_PRIVATE_REPOS=False): + for url, valid in public_urls: + initial = { + 'name': 'foo', + 'repo_type': 'git', + 'repo': url, + } + form = ProjectBasicsForm(initial) + self.assertEqual(form.is_valid(), valid, msg=url) with override_settings(ALLOW_PRIVATE_REPOS=True): for url, valid in private_urls: