def test_image(): """ Simple serialization test :return: """ i = Image() i.user_id = 'user' i.id = 'image1' i.state = 'active' i.digest = 'digest' i.tags = ['tag1', 'tag2'] assert i.to_json() == { 'id': 'image1', 'user_id': 'user', 'digest': 'digest', 'tags': ['tag1', 'tag2'], 'state': 'active', 'created_at': None, 'last_modified': None, 'distro_namespace': None }
def test_image(): """ Simple serialization test :return: """ i = Image() i.user_id = "user" i.id = "image1" i.state = "active" i.digest = "digest" i.tags = ["tag1", "tag2"] assert i.to_json() == { "id": "image1", "user_id": "user", "digest": "digest", "tags": ["tag1", "tag2"], "state": "active", "created_at": None, "last_modified": None, "distro_namespace": None, }