def test_update_pet(self):
        """Test case for update_pet

        Update an existing pet
        """
        body = Pet()
        response = self.client.open('/pet',
                                    method='PUT',
                                    data=json.dumps(body),
                                    content_type='application/json')
        self.assert200(response,
                       'Response body is : ' + response.data.decode('utf-8'))
示例#2
0
    def test_add_pet(self):
        """Test case for add_pet

        Add another kitten, doggy, or fluffball to your store
        """
        body = Pet()
        response = self.client.open('/alta3/python_api_example/1.0.0/pet',
                                    method='POST',
                                    data=json.dumps(body),
                                    content_type='application/json')
        self.assert200(response,
                       'Response body is : ' + response.data.decode('utf-8'))
    def test_add_pet(self):
        """Test case for add_pet

        Add a new pet to the store
        """
        body = Pet()
        response = self.client.open('/pet',
                                    method='POST',
                                    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'))