changeset 4957:fba959635dcd

merge main
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Fri, 21 Aug 2009 23:36:54 +0200
parents 6638f02fc4b0 (current diff) b16cea282fe0 (diff)
children 897840f96acc 7d01d6bbdcab
files
diffstat 4 files changed, 13 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/_tests/test_PageEditor.py	Fri Aug 21 23:28:49 2009 +0200
+++ b/MoinMoin/_tests/test_PageEditor.py	Fri Aug 21 23:36:54 2009 +0200
@@ -168,6 +168,7 @@
 
     def teardown_method(self, method):
         self.request.cfg.event_handlers = self.old_handlers
+        nuke_page(self.request, u'AutoCreatedMoinMoinTemporaryTestPageFortestSave')
 
     def testSaveAbort(self):
         """Test if saveText() is interrupted if PagePreSave event handler returns Abort"""
--- a/MoinMoin/macro/_tests/test_GetVal.py	Fri Aug 21 23:28:49 2009 +0200
+++ b/MoinMoin/macro/_tests/test_GetVal.py	Fri Aug 21 23:36:54 2009 +0200
@@ -47,9 +47,9 @@
     def testGetValACLs(self):
         """ macro GetVal test: 'cant read VAR on an ACL protected page' """
         py.test.skip("user has no rights to create acl pages")
-        self.page = create_page(self.request, self.pagename,
-                                '#acl SomeUser:read,write All:delete\n VAR:: This is an example')
-        result = self._test_macro(u'GetVal', "%s,%s" % (self.pagename, u'VAR'))
+        page = create_page(self.request, self.pagename,
+                           '#acl SomeUser:read,write All:delete\n VAR:: This is an example')
+        result = self._test_macro(u'GetVal', "%s,%s" % (self.pagename, u'VAR'), page)
         assert result == "&lt;&lt;GetVal: You don't have enough rights on this page&gt;&gt;"
 
 coverage_modules = ['MoinMoin.macro.GetVal']
--- a/MoinMoin/script/migration/_tests/test_conv160_wiki.py	Fri Aug 21 23:28:49 2009 +0200
+++ b/MoinMoin/script/migration/_tests/test_conv160_wiki.py	Fri Aug 21 23:36:54 2009 +0200
@@ -21,7 +21,11 @@
 import py
 #py.test.skip("broken")
 
+from MoinMoin import i18n
+i18n_wikiLanguages = i18n.wikiLanguages
+# convert_wiki overwrites i18n.wikiLanguages, we revert this change for following tests
 from MoinMoin.script.migration._conv160_wiki import convert_wiki
+i18n.wikiLanguages = i18n_wikiLanguages
 
 class TestWikiConversion:
     """ test the wiki markup conversion 1.5.8 -> 1.6.0 """
@@ -111,7 +115,7 @@
             # macros
             ('[[BR]]', {}, '<<BR>>'),
             ('[[FullSearch(wtf)]]', {}, '<<FullSearch(wtf)>>'),
-            (u'[[ImageLink(tst.png)]]', {}, u'[[attachment:tst.png|{{attachment:tst.png}}]]'),
+            (u'[[ImageLink(töst.png)]]', {}, u'[[attachment:töst.png|{{attachment:töst.png}}]]'),
             ('[[ImageLink(test.png,OtherPage)]]', {}, '[[OtherPage|{{attachment:test.png}}]]'),
             ('[[ImageLink(test.png,OtherPage,width=123,height=456)]]', {}, '[[OtherPage|{{attachment:test.png||width=123, height=456}}]]'),
             ('[[ImageLink(test.png,OtherPage,width=123,height=456,alt=alttext)]]', {}, '[[OtherPage|{{attachment:test.png|alttext|width=123, height=456}}]]'),
--- a/MoinMoin/script/migration/_tests/test_conv160a_wiki.py	Fri Aug 21 23:28:49 2009 +0200
+++ b/MoinMoin/script/migration/_tests/test_conv160a_wiki.py	Fri Aug 21 23:36:54 2009 +0200
@@ -20,7 +20,11 @@
 import py
 #py.test.skip("broken")
 
+from MoinMoin import i18n
+i18n_wikiLanguages = i18n.wikiLanguages
+# convert_wiki overwrites i18n.wikiLanguages, we revert this change for following tests
 from MoinMoin.script.migration._conv160a_wiki import convert_wiki
+i18n.wikiLanguages = i18n_wikiLanguages
 
 class TestWikiConversion:
     """ test the wiki markup conversion 1.6.0a -> 1.6.0 """