changeset 2164:7fed5edaa2a5

tests: some fixes
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Mon, 18 Jun 2007 22:31:50 +0200
parents 93e8ba421a88
children eed1c7da25eb
files MoinMoin/_tests/test_formatter.py MoinMoin/_tests/test_wikiutil.py
diffstat 2 files changed, 17 insertions(+), 17 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/_tests/test_formatter.py	Mon Jun 18 21:43:28 2007 +0200
+++ b/MoinMoin/_tests/test_formatter.py	Mon Jun 18 22:31:50 2007 +0200
@@ -39,5 +39,5 @@
         #page.formatter.setPage(page)
         #page.hilite_re = None
 
-        return self.request.redirectedOutput(page.send_page)
+        return self.request.redirectedOutput(page.send_page, content_only=1)
 
--- a/MoinMoin/_tests/test_wikiutil.py	Mon Jun 18 21:43:28 2007 +0200
+++ b/MoinMoin/_tests/test_wikiutil.py	Mon Jun 18 22:31:50 2007 +0200
@@ -62,35 +62,35 @@
 
 
 class TestParmeterParser(unittest.TestCase):
- 
+
     def testNoWantedArguments(self):
         args = ''
         argParser = wikiutil.ParameterParser('')
         self.arg_list, self.arg_dict = argParser.parse_parameters(args)
-        result = len(self.arg_dict) > 0
-        expected = False
-        self.assert_(result is expected,
+        result = len(self.arg_dict)
+        expected = 0
+        self.assert_(result == expected,
                      'Expected "%(expected)s" but got "%(result)s"' % locals())
 
     def testWantedArguments(self):
-        test_args = ('', 
+        test_args = ('',
                      'width=100',
                      'width=100, height=200', )
-       
+
         argParser = wikiutil.ParameterParser("%(width)s%(height)s")
-        for args in test_args: 
+        for args in test_args:
             self.arg_list, self.arg_dict = argParser.parse_parameters(args)
-            result = len(self.arg_dict) == 2
-            expected = True
-            self.assert_(result is expected,
+            result = len(self.arg_dict)
+            expected = 2
+            self.assert_(result == expected,
                          'Expected "%(expected)s" but got "%(result)s"' % locals())
-      
+
     def testTooMuchWantedArguments(self):
         args = 'width=100, height=200, alt=Example'
         argParser = wikiutil.ParameterParser("%(width)s%(height)s")
         self.arg_list, self.arg_dict = argParser.parse_parameters(args)
-        result = len(self.arg_dict) == 2
-        expected = True
-        self.assert_(result is expected,
-                     'Expected "%(expected)s" but got "%(result)s"' % locals())  
-      
\ No newline at end of file
+        result = len(self.arg_dict)
+        expected = 2
+        self.assert_(result == expected,
+                     'Expected "%(expected)s" but got "%(result)s"' % locals())
+