Author: batiste.bieler
Date: Fri Jan 23 04:00:51 2009
New Revision: 300

Modified:
    trunk/pages/tests.py

Log:
Add a create page test

Modified: trunk/pages/tests.py
==============================================================================
--- trunk/pages/tests.py        (original)
+++ trunk/pages/tests.py        Fri Jan 23 04:00:51 2009
@@ -1,4 +1,5 @@
  from django.test import TestCase
+
  from pages.models import *
  from django.test.client import Client

@@ -7,10 +8,20 @@

      def test_01_add_page(self):
          """
-        Test that the add admin page could be displayed correctly
+        Test that the add admin page could be displayed via the admin
          """
          c = Client()
          c.login(username= 'batiste', password='b')
          response = c.get('/admin/pages/page/add/')
          assert(response.status_code == 200)
-
+
+
+    def test_02_create_page(self):
+        """
+        Test that a page can be created via the admin
+        """
+        c = Client()
+        c.login(username= 'batiste', password='b')
+        page_data = {'title':'test  
page', 'slug':'test-page', 'language':'en', 'sites':[1], 'status':1}
+        response = c.post('/admin/pages/page/add/', page_data)
+        self.assertRedirects(response, '/admin/pages/page/')

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pinax-updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/pinax-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to