Skip to content
This repository
Browse code

Freshened some tests.

  • Loading branch information...
commit 967c508665bbde0a4b016d5be50a181ae39bd3c6 1 parent 3c27d93
Tim White authored September 18, 2012

Showing 1 changed file with 29 additions and 1 deletion. Show diff stats Hide diff stats

  1. 30  podiobooks/core/tests/tests_urls.py
30  podiobooks/core/tests/tests_urls.py
@@ -33,6 +33,18 @@ def test_title_search_keywords_post(self):
33 33
         
34 34
         response = self.client.post('/title/search/', {"keywords": "dollie", "include_adult": 1, "completed_only": 1})
35 35
         self.assertEquals(200, response.status_code)
  36
+
  37
+    def test_title_search_keywords_get(self):
  38
+        response = self.client.get('/title/search/?keyword=sigler')
  39
+        self.assertEquals(200, response.status_code)
  40
+
  41
+    def test_title_search_pb1(self):
  42
+        response = self.client.get('/podiobooks/search.php?keyword=sigler')
  43
+        self.assertRedirects(response, '/title/search/?keyword=sigler', status_code=301)
  44
+
  45
+    def test_title_category_search_pb1(self):
  46
+        response = self.client.get('/podiobooks/search.php?category=1', follow=True)
  47
+        self.assertRedirects(response, '/category/science-fiction/', status_code=301)
36 48
         
37 49
     def test_title_detail(self):
38 50
         response = self.client.get('/title/trader-tales-4-double-share/')
@@ -64,4 +76,20 @@ def test_series_list(self):
64 76
         
65 77
     def test_series_detail(self):
66 78
         response = self.client.get('/series/a-traders-tale-from-the-golden-age-of-the-solar-clipper/')
67  
-        self.assertEquals(200, response.status_code)
  79
+        self.assertEquals(200, response.status_code)
  80
+
  81
+    def test_pb1_login_redirect(self):
  82
+        response = self.client.get('/login.php')
  83
+        self.assertEquals(301, response.status_code)
  84
+
  85
+    def test_pb1_xlogin_redirect(self):
  86
+        response = self.client.get('/Xlogin.php')
  87
+        self.assertEquals(301, response.status_code)
  88
+
  89
+    def test_pb1_charts_redirect(self):
  90
+        response = self.client.get('/charts.php')
  91
+        self.assertEquals(301, response.status_code)
  92
+
  93
+    def test_pb1_feed_redirect(self):
  94
+        response = self.client.get('/title/trader-tales-4-double-share/feed/')
  95
+        self.assertRedirects(response, '/rss/feeds/episodes/trader-tales-4-double-share/', status_code=301)

0 notes on commit 967c508

Please sign in to comment.
Something went wrong with that request. Please try again.