Пример #1
0
    def test_to_body_with_release_date_only(self, track, tweet_song_config):
        tweet_song_config.body_config.with_track = False
        tweet_song_config.body_config.with_album = False
        tweet_song_config.body_config.with_artists = False
        tweet_song_config.body_config.with_tracks = False
        tweet_song_config.body_config.with_release_date = True
        body_template = BodyTemplate(track, tweet_song_config.body_config)

        assert body_template.to_body() == 'Release: 2006\n'
Пример #2
0
    def test_to_body_with_artists_only(self, track, tweet_song_config):
        tweet_song_config.body_config.with_track = False
        tweet_song_config.body_config.with_album = False
        tweet_song_config.body_config.with_artists = True
        tweet_song_config.body_config.with_tracks = False
        tweet_song_config.body_config.with_release_date = False
        body_template = BodyTemplate(track, tweet_song_config.body_config)

        assert body_template.to_body() == 'Artist: Ely Guerra\n'
Пример #3
0
    def test_to_body_with_album_only(self, track, tweet_song_config):
        tweet_song_config.body_config.with_track = False
        tweet_song_config.body_config.with_album = True
        tweet_song_config.body_config.with_artists = False
        tweet_song_config.body_config.with_tracks = False
        tweet_song_config.body_config.with_release_date = False
        body_template = BodyTemplate(track, tweet_song_config.body_config)

        assert body_template.to_body() == 'Album: Pa morirse de amor\n'
Пример #4
0
    def test_to_body_with_track_only(self, track, tweet_song_config):
        tweet_song_config.body_config.with_track = True
        tweet_song_config.body_config.with_album = False
        tweet_song_config.body_config.with_artists = False
        tweet_song_config.body_config.with_tracks = False
        tweet_song_config.body_config.with_release_date = False
        body_template = BodyTemplate(track, tweet_song_config.body_config)

        assert body_template.to_body() == 'Track: 1. Peligro\n'
Пример #5
0
    def test_to_body_default_config(self, track, tweet_config):
        body_template = BodyTemplate(track, tweet_config.body_config)

        assert body_template.to_body() == ''
Пример #6
0
    def test_body_with_release_date_false(self, track, tweet_song_config):
        tweet_song_config.body_config.with_release_date = False
        body_template = BodyTemplate(track, tweet_song_config.body_config)

        assert body_template.release_date() == ''
Пример #7
0
    def test_body_with_release_date_true(self, track, tweet_song_config):
        tweet_song_config.body_config.with_release_date = True
        body_template = BodyTemplate(track, tweet_song_config.body_config)

        assert body_template.release_date() == 'Release: 2006\n'
Пример #8
0
    def test_body_with_tracks_false(self, track, tweet_song_config):
        tweet_song_config.body_config.with_tracks = False
        body_template = BodyTemplate(track, tweet_song_config.body_config)

        assert body_template.tracks() == ''
Пример #9
0
    def test_body_with_tracks_true(self, track, tweet_song_config):
        tweet_song_config.body_config.with_tracks = True
        body_template = BodyTemplate(track, tweet_song_config.body_config)

        assert body_template.tracks() == 'Tracks: 19\n'
Пример #10
0
    def test_body_with_artists_true(self, track, tweet_song_config):
        tweet_song_config.body_config.with_artists = True
        body_template = BodyTemplate(track, tweet_song_config.body_config)

        assert body_template.artists() == 'Artist: Ely Guerra\n'
Пример #11
0
    def test_body_with_album_false(self, track, tweet_song_config):
        tweet_song_config.body_config.with_album = False
        body_template = BodyTemplate(track, tweet_song_config.body_config)

        assert body_template.album() == ''
Пример #12
0
    def test_body_with_album_true(self, track, tweet_song_config):
        tweet_song_config.body_config.with_album = True
        body_template = BodyTemplate(track, tweet_song_config.body_config)

        assert body_template.album() == 'Album: Pa morirse de amor\n'
Пример #13
0
    def test_body_with_track_true(self, track, tweet_song_config):
        tweet_song_config.body_config.with_track = True
        body_template = BodyTemplate(track, tweet_song_config.body_config)

        assert body_template.track() == 'Track: 1. Peligro\n'
Пример #14
0
    def test_constructor(self, track, tweet_song_config):
        body_template = BodyTemplate(track, tweet_song_config.body_config)

        assert body_template._track == track
        assert body_template._config == tweet_song_config.body_config