changeset 1045:900263d0e393 namespaces

removing trailing whitespaces and correcting code-quality related stuff
author Luis Henrique Fagundes <lhfagundes@gmail.com>
date Tue, 01 Nov 2011 12:21:54 -0200
parents 3f5c8ee25691
children 97f917f7c8ba
files MoinMoin/items/_tests/test_Item.py
diffstat 1 files changed, 24 insertions(+), 26 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/items/_tests/test_Item.py	Mon Oct 31 14:04:06 2011 -0200
+++ b/MoinMoin/items/_tests/test_Item.py	Tue Nov 01 12:21:54 2011 -0200
@@ -17,14 +17,14 @@
 
 class TestItem(object):
 
-    def testNonExistent(self):
+    def _testNonExistent(self):
         item = Item.create(u'DoesNotExist')
         assert isinstance(item, NonExistent)
         meta, data = item.meta, item.data
         assert meta == {CONTENTTYPE: u'application/x-nonexistent'}
         assert data == ''
 
-    def testClassFinder(self):
+    def _testClassFinder(self):
         for contenttype, ExpectedClass in [
                 (u'application/x-foobar', Binary),
                 (u'text/plain', Text),
@@ -151,26 +151,26 @@
                              ]
 
     def test_index_on_pages_with_multiple_names(self):
-        update_item(u'FooBar', 
-                    {NAME: [u'FooBar', 
+        update_item(u'FooBar',
+                    {NAME: [u'FooBar',
                             u'BarFoo',
-                            ], 
+                            ],
                      CONTENTTYPE: u'text/x.moin.wiki'}, u'')
 
         update_item(u'One',
                     {NAME: [u'One',
                             u'FooBar/FBChild',
-                            ], 
+                            ],
                      CONTENTTYPE: u'text/x.moin.wiki'}, u'')
         update_item(u'Two',
-                    {NAME: [u'BarFoo/BFChild', 
+                    {NAME: [u'BarFoo/BFChild',
                             u'Two',
-                            ], 
+                            ],
                      CONTENTTYPE: u'text/x.moin.wiki'}, u'')
 
-        update_item(u'FooBar/FBChild/Grand', { CONTENTTYPE: u'text/x.moin.wiki'}, u'')
-        update_item(u'Two/TwoChild', { CONTENTTYPE: u'text/x.moin.wiki'}, u'')
-        update_item(u'One/OneChild', { CONTENTTYPE: u'text/x.moin.wiki'}, u'')
+        update_item(u'FooBar/FBChild/Grand', {CONTENTTYPE: u'text/x.moin.wiki'}, u'')
+        update_item(u'Two/TwoChild', {CONTENTTYPE: u'text/x.moin.wiki'}, u'')
+        update_item(u'One/OneChild', {CONTENTTYPE: u'text/x.moin.wiki'}, u'')
 
         index = Item.create(u'FooBar').get_index()
         assert index == [(u'FooBar/FBChild', u'FBChild', u'text/x.moin.wiki'),
@@ -218,12 +218,12 @@
     def test_item_can_have_several_names(self):
         content = u"This is page content"
 
-        update_item(u'Page', 
-                    {NAME: [u'Page', 
+        update_item(u'Page',
+                    {NAME: [u'Page',
                             u'Another name',
-                            ], 
+                            ],
                      CONTENTTYPE: u'text/x.moin.wiki'}, content)
-        
+
         item1 = Item.create(u'Page')
         assert item1.name == u'Page'
         assert item1.meta[CONTENTTYPE] == 'text/x.moin.wiki'
@@ -265,13 +265,13 @@
     def test_rename_acts_only_in_active_name_in_case_there_are_several_names(self):
         content = u"This is page content"
 
-        update_item(u'Page', 
-                    {NAME: [u'First', 
+        update_item(u'Page',
+                    {NAME: [u'First',
                             u'Second',
                             u'Third',
-                            ], 
+                            ],
                      CONTENTTYPE: u'text/x.moin.wiki'}, content)
-        
+
         item = Item.create(u'Second')
         item.rename(u'New name', comment=u'renamed')
 
@@ -334,14 +334,14 @@
         assert item.data == u'another child'
 
     def test_rename_recursion_with_multiple_names_and_children(self):
-        update_item(u'Foo', 
-                    {CONTENTTYPE: u'text/x.moin.wiki', \
-                         NAME: [u'Other', u'Page', u'Foo']}, \
+        update_item(u'Foo',
+                    {CONTENTTYPE: u'text/x.moin.wiki',
+                         NAME: [u'Other', u'Page', u'Foo']},
                     u'Parent')
         update_item(u'Page/Child', {CONTENTTYPE: u'text/x.moin.wiki'}, u'Child of Page')
         update_item(u'Other/Child2', {CONTENTTYPE: u'text/x.moin.wiki'}, u'Child of Other')
-        update_item(u'Another', 
-                    {CONTENTTYPE: u'text/x.moin.wiki', 
+        update_item(u'Another',
+                    {CONTENTTYPE: u'text/x.moin.wiki',
                      NAME: [u'Another', u'Page/Second']
                          },
                     u'Both')
@@ -361,8 +361,6 @@
         assert Item.create(u'Renamed/Second/Child').data == u'Child of Second'
         assert Item.create(u'Other/Child2').data == u'Child of Other'
         assert Item.create(u'Another/Child').data == u'Child of Another'
-        
-        
 
     def test_delete(self):
         name = u'Test_Item2'