diff --git a/readthedocs/rtd_tests/tests/test_project_views.py b/readthedocs/rtd_tests/tests/test_project_views.py index 7c5b286bdd4..bd53fedf910 100644 --- a/readthedocs/rtd_tests/tests/test_project_views.py +++ b/readthedocs/rtd_tests/tests/test_project_views.py @@ -105,6 +105,27 @@ def request(self, *args, **kwargs): kwargs['user'] = self.user return super().request(*args, **kwargs) + def test_form_import_from_remote_repo(self): + self.client.force_login(self.user) + + data = { + 'name': 'pipdocs', + 'repo': 'https://github.com/fail/sauce', + 'repo_type': 'git', + 'remote_repository': '1234', + } + resp = self.client.post( + '/dashboard/import/', + data, + ) + self.assertEqual(resp.status_code, 200) + + # The form is filled with the previous information + self.assertEqual( + resp.context['form'].initial, + data, + ) + def test_form_pass(self): """Only submit the basics.""" resp = self.post_step('basics')