예제 #1
0
    def test_de_json_all(self, client):
        json_dict = {
            'title': self.title,
            'cover': self.cover,
            'embed_url': self.embed_url,
            'provider': self.provider,
            'provider_video_id': self.provider_video_id,
            'youtube_url': self.youtube_url,
            'thumbnail_url': self.thumbnail_url,
            'duration': self.duration,
            'text': self.text,
            'html_auto_play_video_player': self.html_auto_play_video_player,
            'regions': self.regions,
        }
        video = Video.de_json(json_dict, client)

        assert video.title == self.title
        assert video.cover == self.cover
        assert video.embed_url == self.embed_url
        assert video.provider == self.provider
        assert video.provider_video_id == self.provider_video_id
        assert video.youtube_url == self.youtube_url
        assert video.thumbnail_url == self.thumbnail_url
        assert video.duration == self.duration
        assert video.text == self.text
        assert video.html_auto_play_video_player == self.html_auto_play_video_player
        assert video.regions == self.regions
예제 #2
0
    def test_de_json_required(self, client):
        json_dict = {'title': self.title}
        video = Video.de_json(json_dict, client)

        assert video.title == self.title
예제 #3
0
 def test_de_json_none(self, client):
     assert Video.de_json({}, client) is None