def test_add_cat(self): """Test case for add_cat Dodaj novu kategoriju """ body = Category() response = self.client.open('/v2/category', method='POST', data=json.dumps(body), content_type='application/json') self.assert200(response, 'Response body is : ' + response.data.decode('utf-8'))
def test_update_cat(self): """Test case for update_cat Promeni postojecu kategoriju """ body = Category() response = self.client.open('/v2/category', method='PUT', data=json.dumps(body), content_type='application/json') self.assert200(response, 'Response body is : ' + response.data.decode('utf-8'))
def test_update_pet(self): """Test case for update_pet Update an existing pet """ body = Pet() data = dict(id=789, name='name_example', category=Category(), photo_urls='photo_urls_example', tags=Tag(), status='status_example') response = self.client.open( '/v3/pet', method='PUT', data=json.dumps(body), data=data, content_type='application/json') self.assert200(response, 'Response body is : ' + response.data.decode('utf-8'))