예제 #1
0
 def on_post_saves_band_in_catalog_test(self):
     band = create_band(name='BandName')
     self.app.post('/band/1', transform.band_to_json(band))
     assert_in('1', self.band_catalog)
     assert_equals(band, self.band_catalog['1'])
예제 #2
0
def band_to_json_test():
    band = create_band(name='SomeBand')
    result_str = band_to_json(band)
    result_dict = json.loads(result_str)
    assert_in('name', result_dict)
    assert_equals(band.name, result_dict['name'])