예제 #1
0
    def test_de_json_all(self, client, artist):
        json_dict = {'id': self.id, 'artist': artist.to_dict(), 'timestamp': self.timestamp}
        artists_likes = ArtistsLikes.de_json(json_dict, client)

        assert artists_likes.id == self.id
        assert artists_likes.artist == artist
        assert artists_likes.timestamp == self.timestamp
예제 #2
0
 def test_de_json_required(self, client):
     json_dict = {}
     artists_likes = ArtistsLikes.de_json(json_dict, client)
예제 #3
0
 def test_de_json_none(self, client):
     assert ArtistsLikes.de_json({}, client) is None