def json_to_band_test():
    json = """{
            "name": "Fasten Pelvis",
            "genres": [ "salsa", "vahtang" ],
            "avatar": "http://goo.gl/CjLGT"
        }"""
    band = json_to_band(json)
    assert_equals(band.name, "Fasten Pelvis")
    assert_in("salsa", band.genres)
    assert_in("vahtang", band.genres)
    assert_equals(band.avatar, "http://goo.gl/CjLGT")
 def on_get_returns_band_from_catalog_test(self):
     band = create_band(name='BandName')
     self.fill_catalog_with('1', band)
     response = self.app.get('/band/1')
     res = transform.json_to_band(response.body)
     assert_equals(res, band)