Author: batiste.bieler
Date: Thu Apr 16 04:52:07 2009
New Revision: 455
Modified:
trunk/pages/tests.py
Log:
Add some doc for the test
Modified: trunk/pages/tests.py
==============================================================================
--- trunk/pages/tests.py (original)
+++ trunk/pages/tests.py Thu Apr 16 04:52:07 2009
@@ -472,7 +472,9 @@
self.assertEqual(hasattr(request, 'session'), True)
def test_18_tree_ordering(self):
-
+ """
+ Test that moving page in the tree is working properly
+ """
c = Client()
c.login(username= 'batiste', password='b')
page_data = self.get_new_page_data()
@@ -493,16 +495,19 @@
child_2 = Content.objects.get_content_slug_by_slug('child-2').page
- self.assertEqual(str(Page.objects.all()), "[<Page: root>, <Page:
child-2>, <Page: child-1>]")
+ self.assertEqual(str(Page.objects.all()),
+ "[<Page: root>, <Page: child-2>, <Page: child-1>]")
response = c.post('/admin/pages/page/%d/move-page/' % child_1.id,
{'position':'first-child', 'target':root_page.id})
- self.assertEqual(str(Page.objects.all()), "[<Page: root>, <Page:
child-1>, <Page: child-2>]")
+ self.assertEqual(str(Page.objects.all()),
+ "[<Page: root>, <Page: child-1>, <Page: child-2>]")
response = c.post('/admin/pages/page/%d/move-page/' % child_2.id,
- {'position':'left', 'target':child_1.id})
+ {'position': 'left', 'target': child_1.id})
- self.assertEqual(str(Page.objects.all()), "[<Page: root>, <Page:
child-2>, <Page: child-1>]")
+ self.assertEqual(str(Page.objects.all()),
+ "[<Page: root>, <Page: child-2>, <Page: child-1>]")
def assertOnlyContextException(self, view):
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---