changeset 3768:b03223ab1818

test_EmbedObject: removed testing for application/ogg because the mime type of ogg files was changed to audio/ogg. Added a testcase for application/pdf.
author Reimar Bauer <rb.proj AT googlemail DOT com>
date Sun, 22 Jun 2008 16:28:12 +0200
parents 0b7f7b9226df
children 8a6960133ec2
files MoinMoin/macro/_tests/test_EmbedObject.py
diffstat 1 files changed, 8 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/macro/_tests/test_EmbedObject.py	Sun Jun 22 14:52:02 2008 +0200
+++ b/MoinMoin/macro/_tests/test_EmbedObject.py	Sun Jun 22 16:28:12 2008 +0200
@@ -55,7 +55,7 @@
     def testEmbedObjectMimetype(self):
         """ tests defined mimetyes """
         tests = [
-            (u'test.ogg', 'application/ogg'),
+            (u'test.pdf', 'application/pdf'),
             (u'test.svg', 'image/svg+xml'),
             (u'test.mpg', 'video/mpeg'),
             (u'test.mp3', 'audio/mpeg'),
@@ -68,27 +68,27 @@
     def testEmbedObjectDefaultValues(self):
         """ tests default values of macro EmbedObject """
         m = self._make_macro()
-        filename = 'test.ogg'
+        filename = 'test.mpg'
         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.mpg"' in result
         assert 'align="middle"' in result
         assert 'value="transparent"' in result
 
     def testEmbedObjectPercentHeight(self):
         """ tests a unit value for macro EmbedObject """
         m = self._make_macro()
-        filename = 'test.ogg'
+        filename = 'test.mpg'
         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.mpg"' in result
         assert 'height="50%"' in result
         assert 'align="middle"' in result
 
     def testEmbedObjectFromUrl(self):
         """ tests using a URL for macro EmbedObject """
         m = self._make_macro()
-        target = 'http://localhost/%s?action=AttachFile&do=view&target=test.ogg' % self.pagename
-        result = m.execute('EmbedObject', u'target=%s, url_mimetype=application/ogg' % target)
-        assert '<object data="http://localhost/AutoCreatedMoinMoinTemporaryTestPageForEmbedObject?action=AttachFile&amp;do=view&amp;target=test.ogg" type="application/ogg"' in result
+        target = 'http://localhost/%s?action=AttachFile&do=view&target=test.mpg' % self.pagename
+        result = m.execute('EmbedObject', u'target=%s, url_mimetype=video/mpeg' % target)
+        assert '<object data="http://localhost/AutoCreatedMoinMoinTemporaryTestPageForEmbedObject?action=AttachFile&amp;do=view&amp;target=test.mpg" type="video/mpeg"' in result
 
 coverage_modules = ['MoinMoin.macro.EmbedObject']