Commits

John Chandler committed d975dba

Added test for the slow genre search view

Comments (0)

Files changed (1)

fluidocalypse/tests/test_views.py

 from django.test import TestCase
 
+
 class TestRootView( TestCase ):
     """ Test the root URL view redirection """
     def test_root_redirects_genre_search( self ):
         """ Test showing known band """
         response = self.client.get( "/band/Napalm%20Death" )
 
-        self.assertEqual( response.status_code, 200 )
+        self.assertEqual( response.status_code, 200 )  # yes, it's a sucky test at the moment
 
 
 class TestShowGenre( TestCase ):
         """ Test showing known genre """
         response = self.client.get( "/genre/jazz" )
 
-        self.assertEqual( response.status_code, 200 )
+        self.assertEqual( response.status_code, 200 )  # yes, it's a sucky test at the moment
+
+
+class TestShowSearch( TestCase ):
+    """ Test the show_search view """
+    def test_search_genre( self ):
+        """ Test of the search genre page - yes, the slooooow one!
+            Really needs to mock get_all_genres()
+        """
+        response = self.client.get( "/search/genre" )
+
+        self.assertEqual( response.status_code, 200 )  # sucky test, can only get better
+
+
+