Commits

David Chambers committed 29a5e6e

Added rudimentary test cases for feed and sitemap.

Comments (0)

Files changed (1)

tests/__init__.py

 from mango.utils import primary_author_email
 
 
+client = Client()
+
 def create_document(source='', filename='test.text'):
     source = '\n'.join((l.lstrip() for l in source.strip().splitlines()))
     filepath = os.path.join(mango.settings.MANGO_PATH, 'examples', filename)
         subject, message = 'Test message', '**Hello!**'
         sender = '%s <%s>' % (name, email)
 
-        client = Client()
         path = reverse('mango.views.contact')
         data = {
             'sender_name': name, 'sender_email': email,
         self.assertFalse(document._excerpt)
 
 
+class FeedTests(unittest.TestCase):
+
+    def test_status_code(self):
+        response = client.get('/feed/')
+        self.assertEqual(response.status_code, 200)
+
+
 class FileNameTests(unittest.TestCase):
 
     def setUp(self):
         self.assertEqual(related[2].title, 'a, x')     # 1/3
 
 
+class SitemapTests(unittest.TestCase):
+
+    def test_status_code(self):
+        response = client.get('/sitemap.xml')
+        self.assertEqual(response.status_code, 200)
+
+
 class SubscriptionTests(unittest.TestCase):
 
     def test_unicode(self):