changeset 4209:7abbc2bb328d

Fix tests: script_root in links wrongly expected to be "." (for tests)
author Florian Krupicka <florian.krupicka@googlemail.com>
date Wed, 09 Jul 2008 17:51:29 +0200
parents 10132d2696dc
children d9de4fa12f23
files MoinMoin/macro/_tests/test_Action.py MoinMoin/macro/_tests/test_EmbedObject.py MoinMoin/macro/_tests/test_StatsChart.py MoinMoin/parser/_tests/test_text_creole.py MoinMoin/parser/_tests/test_text_moin_wiki.py
diffstat 5 files changed, 23 insertions(+), 23 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/macro/_tests/test_Action.py	Wed Jul 09 16:32:50 2008 +0200
+++ b/MoinMoin/macro/_tests/test_Action.py	Wed Jul 09 17:51:29 2008 +0200
@@ -40,7 +40,7 @@
         result = Action.macro_Action(m, 'raw')
         nuke_page(request, self.pagename)
 
-        expected = '<a href="./AutoCreatedMoinMoinTemporaryTestPageForAction?action=raw">raw</a>'
+        expected = '<a href="/AutoCreatedMoinMoinTemporaryTestPageForAction?action=raw">raw</a>'
         assert result == expected
 
 
--- a/MoinMoin/macro/_tests/test_EmbedObject.py	Wed Jul 09 16:32:50 2008 +0200
+++ b/MoinMoin/macro/_tests/test_EmbedObject.py	Wed Jul 09 17:51:29 2008 +0200
@@ -70,7 +70,7 @@
         m = self._make_macro()
         filename = 'test.ogg'
         result = m.execute('EmbedObject', u'%s' % filename)
-        assert '<object data="./AutoCreatedMoinMoinTemporaryTestPageForEmbedObject?action=AttachFile&amp;do=get&amp;target=test.ogg"' in result
+        assert '<object data="/AutoCreatedMoinMoinTemporaryTestPageForEmbedObject?action=AttachFile&amp;do=get&amp;target=test.ogg"' in result
         assert 'align="middle"' in result
         assert 'value="transparent"' in result
 
@@ -80,7 +80,7 @@
         filename = 'test.ogg'
         height = '50 %' # also tests that space is allowed in there
         result = m.execute('EmbedObject', u'target=%s, height=%s' % (filename, height))
-        assert '<object data="./AutoCreatedMoinMoinTemporaryTestPageForEmbedObject?action=AttachFile&amp;do=get&amp;target=test.ogg"' in result
+        assert '<object data="/AutoCreatedMoinMoinTemporaryTestPageForEmbedObject?action=AttachFile&amp;do=get&amp;target=test.ogg"' in result
         assert 'height="50%"' in result
         assert 'align="middle"' in result
 
--- a/MoinMoin/macro/_tests/test_StatsChart.py	Wed Jul 09 16:32:50 2008 +0200
+++ b/MoinMoin/macro/_tests/test_StatsChart.py	Wed Jul 09 17:51:29 2008 +0200
@@ -48,19 +48,19 @@
     def testStatsChart_useragents(self):
         """ macro StatsChart useragents test: 'tests useragents' and clean page scope cache """
         result = self._test_macro(u'StatsChart', u'useragents')
-        expected = u'<form action="./AutoCreatedMoinMoinTemporaryTestPageStatsChart" method="GET"'
+        expected = u'<form action="/AutoCreatedMoinMoinTemporaryTestPageStatsChart" method="GET"'
         assert expected in result
 
     def testStatsChart_hitcounts(self):
         """ macro StatsChart hitcounts test: 'tests hitcounts' and clean page scope cache  """
         result = self._test_macro(u'StatsChart', u'hitcounts')
-        expected = u'<form action="./AutoCreatedMoinMoinTemporaryTestPageStatsChart" method="GET"'
+        expected = u'<form action="/AutoCreatedMoinMoinTemporaryTestPageStatsChart" method="GET"'
         assert expected in result
 
     def testStatsChart_languages(self):
         """ macro StatsChart languages test: 'tests languages' and clean page scope cache  """
         result = self._test_macro(u'StatsChart', u'hitcounts')
-        expected = u'<form action="./AutoCreatedMoinMoinTemporaryTestPageStatsChart" method="GET"'
+        expected = u'<form action="/AutoCreatedMoinMoinTemporaryTestPageStatsChart" method="GET"'
         assert expected in result
 
 coverage_modules = ['MoinMoin.stats']
--- a/MoinMoin/parser/_tests/test_text_creole.py	Wed Jul 09 16:32:50 2008 +0200
+++ b/MoinMoin/parser/_tests/test_text_creole.py	Wed Jul 09 17:51:29 2008 +0200
@@ -387,14 +387,14 @@
     needle = re.compile(text % r'(.+)')
     _tests = [
         # test,           expected
-        ('[[SomeNonExistentPage]]', '<a class="nonexistent" href="./SomeNonExistentPage">SomeNonExistentPage</a>'),
-        ('[[SomeNonExistentPage#anchor]]', '<a class="nonexistent" href="./SomeNonExistentPage#anchor">SomeNonExistentPage#anchor</a>'),
-        ('[[something]]', '<a class="nonexistent" href="./something">something</a>'),
-        ('[[some thing]]', '<a class="nonexistent" href="./some%20thing">some thing</a>'),
-        ('[[something|some text]]', '<a class="nonexistent" href="./something">some text</a>'),
-        ('[[../something]]', '<a class="nonexistent" href="./something">../something</a>'),
-        ('[[/something]]', '<a class="nonexistent" href="./%s/something">/something</a>' % PAGENAME),
-        ('[[something#anchor]]', '<a class="nonexistent" href="./something#anchor">something#anchor</a>'),
+        ('[[SomeNonExistentPage]]', '<a class="nonexistent" href="/SomeNonExistentPage">SomeNonExistentPage</a>'),
+        ('[[SomeNonExistentPage#anchor]]', '<a class="nonexistent" href="/SomeNonExistentPage#anchor">SomeNonExistentPage#anchor</a>'),
+        ('[[something]]', '<a class="nonexistent" href="/something">something</a>'),
+        ('[[some thing]]', '<a class="nonexistent" href="/some%20thing">some thing</a>'),
+        ('[[something|some text]]', '<a class="nonexistent" href="/something">some text</a>'),
+        ('[[../something]]', '<a class="nonexistent" href="/something">../something</a>'),
+        ('[[/something]]', '<a class="nonexistent" href="/%s/something">/something</a>' % PAGENAME),
+        ('[[something#anchor]]', '<a class="nonexistent" href="/something#anchor">something#anchor</a>'),
         ('[[MoinMoin:something]]', '<a class="interwiki" href="http://moinmo.in/something" title="MoinMoin">something</a>'),
         ('[[MoinMoin:something|some text]]', '<a class="interwiki" href="http://moinmo.in/something" title="MoinMoin">some text</a>'),
         ('[[MoinMoin:with space]]', '<a class="interwiki" href="http://moinmo.in/with%20space" title="MoinMoin">with space</a>'),
--- a/MoinMoin/parser/_tests/test_text_moin_wiki.py	Wed Jul 09 16:32:50 2008 +0200
+++ b/MoinMoin/parser/_tests/test_text_moin_wiki.py	Wed Jul 09 17:51:29 2008 +0200
@@ -518,20 +518,20 @@
     needle = re.compile(text % r'(.+)')
     _tests = [
         # test,           expected
-        ('SomeNonExistentPage', '<a class="nonexistent" href="./SomeNonExistentPage">SomeNonExistentPage</a>'),
-        ('SomeNonExistentPage#anchor', '<a class="nonexistent" href="./SomeNonExistentPage#anchor">SomeNonExistentPage#anchor</a>'),
-        ('[[something]]', '<a class="nonexistent" href="./something">something</a>'),
-        ('[[some thing]]', '<a class="nonexistent" href="./some%20thing">some thing</a>'),
-        ('[[something|some text]]', '<a class="nonexistent" href="./something">some text</a>'),
-        ('[[../something]]', '<a class="nonexistent" href="./something">../something</a>'),
-        ('[[/something]]', '<a class="nonexistent" href="./%s/something">/something</a>' % PAGENAME),
-        ('[[something#anchor]]', '<a class="nonexistent" href="./something#anchor">something#anchor</a>'),
+        ('SomeNonExistentPage', '<a class="nonexistent" href="/SomeNonExistentPage">SomeNonExistentPage</a>'),
+        ('SomeNonExistentPage#anchor', '<a class="nonexistent" href="/SomeNonExistentPage#anchor">SomeNonExistentPage#anchor</a>'),
+        ('[[something]]', '<a class="nonexistent" href="/something">something</a>'),
+        ('[[some thing]]', '<a class="nonexistent" href="/some%20thing">some thing</a>'),
+        ('[[something|some text]]', '<a class="nonexistent" href="/something">some text</a>'),
+        ('[[../something]]', '<a class="nonexistent" href="/something">../something</a>'),
+        ('[[/something]]', '<a class="nonexistent" href="/%s/something">/something</a>' % PAGENAME),
+        ('[[something#anchor]]', '<a class="nonexistent" href="/something#anchor">something#anchor</a>'),
         ('MoinMoin:something', '<a class="interwiki" href="http://moinmo.in/something" title="MoinMoin">something</a>'),
         ('[[MoinMoin:something|some text]]', '<a class="interwiki" href="http://moinmo.in/something" title="MoinMoin">some text</a>'),
         ('[[MoinMoin:with space]]', '<a class="interwiki" href="http://moinmo.in/with%20space" title="MoinMoin">with space</a>'),
         ('[[MoinMoin:with space|some text]]', '<a class="interwiki" href="http://moinmo.in/with%20space" title="MoinMoin">some text</a>'),
         # no interwiki:
-        ('[[ABC:n]]', '<a class="nonexistent" href="./ABC%3An">ABC:n</a>'), # finnish/swedish abbreviations / possessive
+        ('[[ABC:n]]', '<a class="nonexistent" href="/ABC%3An">ABC:n</a>'), # finnish/swedish abbreviations / possessive
         ('ABC:n', 'ABC:n'), # finnish/swedish abbreviations / possessive
         ('lowercase:nointerwiki', 'lowercase:nointerwiki'),
         ('[[http://google.com/|google]]', '<a class="http" href="http://google.com/">google</a>'),