From c4310a43b52bacd4e08009f165eab54054a21200 Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Jun 11 2014 19:14:43 +0000 Subject: Expand the unit-tests to cover the redirection if only one package is found matching --- diff --git a/tests/test_flask.py b/tests/test_flask.py index b728d69..f7e75a2 100644 --- a/tests/test_flask.py +++ b/tests/test_flask.py @@ -204,6 +204,15 @@ engineers need to create packages and spin them into a distribution.""" self.assertTrue('' in output.data) self.assertTrue('' in output.data) + output = self.app.get('/search/?term=gu*', follow_redirects=True) + self.assertEqual(output.status_code, 200) + self.assertTrue( + '
  • Only one package matching, redirecting you' + ' to it
  • ' in output.data) + self.assertTrue( + '

    Top down terminal for GNOME

    ' + in output.data) + output = self.app.get('/search/?term=g*&type=orphaned', follow_redirects=True) self.assertEqual(output.status_code, 200)