From 045b5608a383c3fe2e63a44f0e885c4321c57633 Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Mar 02 2015 14:14:42 +0000 Subject: Add unit-tests for the view_user endpoint --- diff --git a/tests/test_progit_flask_ui_app.py b/tests/test_progit_flask_ui_app.py index ead263c..39ce787 100644 --- a/tests/test_progit_flask_ui_app.py +++ b/tests/test_progit_flask_ui_app.py @@ -71,6 +71,19 @@ class ProgitFlaskApptests(tests.Modeltests): self.assertTrue('' in output.data) self.assertTrue('' in output.data) + def test_view_user(self): + """ Test the view_user endpoint. """ + + output = self.app.get('/user/pingou?repopage=abc&forkpage=def') + self.assertEqual(output.status_code, 200) + self.assertTrue( + '
' in output.data) + self.assertTrue('

Projects (1)

' in output.data) + self.assertTrue( + '
' in output.data) + self.assertTrue('

Forks (1)

' in output.data) + + if __name__ == '__main__': SUITE = unittest.TestLoader().loadTestsFromTestCase(ProgitFlaskApptests)