Beispiel #1
0
    def test_trakt_add_episode(self):
        episode_config = self.trakt_config.copy()
        episode_config['type'] = 'episodes'
        trakt_set = TraktSet(episode_config)
        # Initialize trakt set
        trakt_set.clear()

        entry = Entry(
            **{
                'trakt_show_slug': 'game-of-thrones',
                'original_url': 'https://trakt.tv/shows/game-of-thrones/seasons/4/episodes/5',
                'url': 'https://trakt.tv/shows/game-of-thrones/seasons/4/episodes/5',
                'series_season': 4,
                'tvdb_id': 121361,
                'series_name': 'Game of Thrones (2011)',
                'imdb_id': 'tt0944947',
                'series_id': 'S04E05',
                'series_episode': 5,
                'trakt_episode_id': 73674,
                'title': 'Game of Thrones (2011) S04E05 First of His Name',
                'trakt_show_id': 1390,
                'trakt_ep_name': 'First of His Name',
                'tvrage_id': 24493,
            }
        )

        assert entry not in trakt_set

        trakt_set.add(entry)
        assert entry in trakt_set
Beispiel #2
0
    def test_trakt_add(self):
        # Initialize trakt set
        trakt_set = TraktSet(self.trakt_config)
        trakt_set.clear()

        entry = Entry(title='White collar', series_name='White Collar (2009)')

        assert entry not in trakt_set

        trakt_set.add(entry)
        time.sleep(5)
        assert entry in trakt_set
    def test_trakt_add_episode_simple(self):
        episode_config = self.trakt_config.copy()
        episode_config['type'] = 'episodes'
        trakt_set = TraktSet(episode_config)
        # Initialize trakt set
        trakt_set.clear()

        entry = Entry(**{u'series_name': u'Game of Thrones (2011)', u'series_id': u'S04E05', u'series_episode': 5,
                         u'series_season': 4, u'title': u'Game of Thrones (2011) S04E05 First of His Name'})

        assert entry not in trakt_set

        trakt_set.add(entry)
        assert entry in trakt_set
Beispiel #4
0
    def test_trakt_add_episode_task(self, execute_task):
        episode_config = self.trakt_config.copy()
        episode_config['type'] = 'episodes'
        # Initialize trakt set
        trakt_set = TraktSet(episode_config)
        trakt_set.clear()

        execute_task('test_add_episode_auto')

        task = execute_task('test_list')
        assert len(task.entries) == 2
        assert task.entries[0]['series_name'] == 'Stranger Things'
        assert task.entries[1]['series_name'] == 'Stranger Things'
        for series_id in ['S01E05', 'S01E06']:
            entry1 = task.entries[0]
            entry2 = task.entries[1]

            assert series_id in [entry1['series_id'], entry2['series_id']]