From 52b6a3a41c016f0073e6fb0d916fa701de142d43 Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Mar 06 2015 15:44:10 +0000 Subject: Adjust the unit-tests now that we check earlier if the git repo exists --- diff --git a/tests/test_progit_flask_ui_plugins.py b/tests/test_progit_flask_ui_plugins.py index f1d4aa4..d6a8527 100644 --- a/tests/test_progit_flask_ui_plugins.py +++ b/tests/test_progit_flask_ui_plugins.py @@ -99,6 +99,13 @@ class ProgitFlaskPluginstests(tests.Modeltests): in output.data) data['csrf_token'] = csrf_token + # No git found + output = self.app.post('/test/settings/Mail', data=data) + self.assertEqual(output.status_code, 404) + + tests.create_projects_git(tests.HERE) + + # With the git repo output = self.app.post('/test/settings/Mail', data=data) self.assertEqual(output.status_code, 200) self.assertTrue('

test project #1

' in output.data) @@ -115,13 +122,7 @@ class ProgitFlaskPluginstests(tests.Modeltests): data['csrf_token'] = csrf_token data['active'] = 'y' - # No git found - output = self.app.post('/test/settings/Mail', data=data) - self.assertEqual(output.status_code, 404) - - tests.create_projects_git(tests.HERE) - # With the git and all output = self.app.post('/test/settings/Mail', data=data) self.assertTrue('

test project #1

' in output.data) self.assertTrue('

Mail

' in output.data)