Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(11)  |  Call(11)  |  Derive(0)  |  Import(0)

src/m/e/mediadrop-HEAD/mediadrop/model/tests/media_example_test.py   mediadrop(Download)
    def test_can_create_example_media(self):
        media = Media.example()
 
        assert_not_none(media.id)
        assert_equals(u'Foo Media', media.title)
    def test_can_override_example_data(self):
        media = Media.example(title=u'Bar Foo')
 
        assert_equals(u'Bar Foo', media.title)
        assert_equals(u'bar-foo', media.slug)

src/m/e/mediadrop-HEAD/mediadrop/lib/auth/tests/filtering_restricted_items_test.py   mediadrop(Download)
        # get rid of default media
        Media.query.delete()
        self.private_media = Media.example(slug=u'private')
        self.public_media = Media.example(slug=u'public')
        self.permission_system = MediaDropPermissionSystem(self.pylons_config)

src/m/e/mediadrop-HEAD/mediadrop/model/tests/media_test.py   mediadrop(Download)
    def setUp(self):
        super(MediaTest, self).setUp()
        self.init_flowplayer()
        self.media = Media.example()
        self.encoding_event = self.create_spy_on_event(events.Media.encoding_done)

src/m/e/mediadrop-HEAD/mediadrop/model/tests/media_status_test.py   mediadrop(Download)
        # "mediadrop.model.players" ("fetch_enabled_players()")
        self.init_flowplayer()
        self.media = Media.example()
 
    def init_flowplayer(self):
    def test_can_detect_video_files(self, suffix):
        media = Media.example()
        assert_not_equals(VIDEO, media.type)
        self.add_external_file(media, suffix)
        media.update_status()
        assert_equals(VIDEO, media.type, message='did not detect %s as VIDEO type' % suffix)
 
    @data(*audio_types)
    def test_can_detect_audio_files(self, suffix):
        media = Media.example()
    def test_does_not_set_type_if_only_audio_description_files_are_attached(self, suffix):
        media = Media.example()
        assert_none(media.type)
        media_file = self.add_external_file(media, suffix)
        media_file.type = AUDIO_DESC
    def test_does_not_set_type_if_only_caption_files_are_attached(self, suffix):
        media = Media.example()
        assert_none(media.type)
        self.add_external_file(media, suffix)
        media.update_status()