diff --git a/tests/test_progit_flask_ui_repo.py b/tests/test_progit_flask_ui_repo.py index 7c5e52e..b6b49b1 100644 --- a/tests/test_progit_flask_ui_repo.py +++ b/tests/test_progit_flask_ui_repo.py @@ -260,14 +260,22 @@ class PagureFlaskRepotests(tests.Modeltests): self.assertTrue( '
' in output.data) - def test_update_project(self): + @patch('pagure.ui.repo.admin_session_timedout') + def test_update_project(self, ast): """ Test the update_project endpoint. """ + ast.return_value = True + output = self.app.post('/foo/update') self.assertEqual(output.status_code, 302) user = tests.FakeUser() with tests.user_set(pagure.APP, user): output = self.app.post('/foo/update') + self.assertEqual(output.status_code, 302) + + ast.return_value = False + + output = self.app.post('/foo/update') self.assertEqual(output.status_code, 404) tests.create_projects(self.session)