Permalink
Browse files

failing test for the IVideo marker interface

  • Loading branch information...
1 parent be496df commit 5c63ad78785c3c79882933f2fa123e6da286241f @tomster tomster committed Aug 18, 2011
@@ -19,3 +19,25 @@ Open a browser and log in as a normal user.
>>> browser.getControl('Log in').click()
+Add an mp4 file to a folder.
+
+ >>> import os
+ >>> from collective.mediaelementjs import tests
+ >>> browser.open(folder.absolute_url())
+ >>> browser.getLink('File').click()
+ >>> ctrl = browser.getControl(name="file_file")
+ >>> opened = open(
+ ... os.path.join(os.path.dirname(tests.__file__), 'barsandtone.mp4'))
+ >>> ctrl.add_file(opened, 'video/x-mp4', 'barsandtone.mp4')
+ >>> browser.getControl('Save').click()
+ >>> opened.close()
+ >>> print browser.contents
+ <...
+ ...Changes saved...
+
+The file now provides IVideo and the display layout has automatically
+been set to the flowplayer view.
+
+ >>> from collective.mediaelementjs import interfaces
+ >>> interfaces.IVideo.providedBy(folder['barsandtone.mp4'])
+ True
@@ -0,0 +1,10 @@
+from zope.interface import Interface
+
+class IMediaElementJSPlayable(Interface):
+ """A file playable with mediaelementjs
+ """
+
+class IVideo(IMediaElementJSPlayable):
+ """Marker interface for files that contain mp4 content
+ """
+
Binary file not shown.

0 comments on commit 5c63ad7

Please sign in to comment.