Example #1
0
 def flowplayer_properties_as_dict(self):
     portal_url = self.portal_state().portal_url()
     return properties_to_dict(self.flowplayer_properties, 
                               portal_url, 
                               ignore=['title', 
                                       'loop',
                                       'initialVolumePercentage',
                                       'showPlaylist',])
 def flowplayer_properties_as_dict(self):
     portal_url = self.portal_state().portal_url()
     return properties_to_dict(self.flowplayer_properties,
                               portal_url,
                               ignore=[
                                   'title', 'loop',
                                   'initialVolumePercentage', 'showPlaylist'
                               ])
Example #3
0
 def test_parsing(self):
     parsed = properties_to_dict(self.props, 'http://localhost', ignore=['title'])
     self.assertEqual(len(parsed.keys()), 2) # plugins, clip
     self.assertEqual(len(parsed['plugins'].keys()), 2) # controls, audio
     self.assertEqual(parsed['plugins']['controls']['all'], False) 
     self.assertEqual(parsed['plugins']['controls']['scrubber'], True) 
     self.assertEqual(parsed['plugins']['controls']['url'], r'http%3A//localhost/flowplayer.controls.swf') 
     self.assertEqual(parsed['plugins']['audio']['url'], r'http%3A//localhost/%2B%2Bresource%2B%2Bcollective.flowplayer/flowplayer.audio.swf') 
     self.assertEqual(parsed['clip']['autoBuffering'], True) 
     self.failIf(parsed.has_key('param'))
 def test_parsing(self):
     parsed = properties_to_dict(self.props, 'http://localhost', ignore=['title'])
     self.assertEqual(len(parsed.keys()), 2)  # plugins, clip
     self.assertEqual(len(parsed['plugins'].keys()), 2)  # controls, audio
     self.assertEqual(parsed['plugins']['controls']['all'], False)
     self.assertEqual(parsed['plugins']['controls']['scrubber'], True)
     self.assertEqual(parsed['plugins']['controls']['url'], r'http%3A//localhost/flowplayer.controls.swf')
     self.assertEqual(parsed['plugins']['audio']['url'], r'http%3A//localhost/%2B%2Bresource%2B%2Bcollective.flowplayer/flowplayer.audio.swf')
     self.assertEqual(parsed['clip']['autoBuffering'], True)
     self.assertNotIn('param', parsed)