Skip to content

Commit

Permalink
Force ALLOW_PRIVATE_REPOS=False for test case
Browse files Browse the repository at this point in the history
  • Loading branch information
humitos committed Jun 6, 2018
1 parent 6eae3fe commit 65a9ebb
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions readthedocs/rtd_tests/tests/test_project_forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,14 +73,15 @@ def test_import_repo_url(self):
('[email protected]: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:
Expand Down

0 comments on commit 65a9ebb

Please sign in to comment.