diff --git a/samples/client/petstore/python/SwaggerPetstore-python/Makefile b/samples/client/petstore/python/SwaggerPetstore-python/Makefile index 8acdd7cc5ac..e829f17159e 100644 --- a/samples/client/petstore/python/SwaggerPetstore-python/Makefile +++ b/samples/client/petstore/python/SwaggerPetstore-python/Makefile @@ -8,7 +8,7 @@ ifndef VIRTUAL_ENV http://docs.python-guide.org/en/latest/dev/virtualenvs/) endif -setup: virtualenv $(SETUP_OUT) +setup: $(SETUP_OUT) $(SETUP_OUT): setup.py setup.cfg python setup.py develop @@ -19,17 +19,19 @@ $(REQUIREMENTS_OUT): $(REQUIREMENTS_FILE) python setup.py develop clean: + rm -rf $(REQUIREMENTS_OUT) + rm -rf $(SETUP_OUT) + rm -rf .tox + rm -rf .coverage find . -name "*.py[oc]" -delete find . -name "__pycache__" -delete - rm -f $(REQUIREMENTS_OUT) - rm -rf $(SETUP_OUT) requirements: setup $(REQUIREMENTS_OUT) -test: requirements +test: clean requirements nosetests -test-all: requirements +test-all: virtualenv clean requirements tox diff --git a/samples/client/petstore/python/SwaggerPetstore-python/pom.xml b/samples/client/petstore/python/SwaggerPetstore-python/pom.xml index 3ff908ed770..e21eb2f5a96 100644 --- a/samples/client/petstore/python/SwaggerPetstore-python/pom.xml +++ b/samples/client/petstore/python/SwaggerPetstore-python/pom.xml @@ -35,7 +35,7 @@ make - test-all + test diff --git a/samples/client/petstore/python/SwaggerPetstore-python/tests/test_pet_api.py b/samples/client/petstore/python/SwaggerPetstore-python/tests/test_pet_api.py index 88a19f61d3c..f0b8ab03d81 100644 --- a/samples/client/petstore/python/SwaggerPetstore-python/tests/test_pet_api.py +++ b/samples/client/petstore/python/SwaggerPetstore-python/tests/test_pet_api.py @@ -94,8 +94,8 @@ class PetApiTests(unittest.TestCase): fetched = self.pet_api.get_pet_by_id(pet_id=self.pet.id) self.assertEqual(self.pet.id, fetched.id) - self.assertEqual(self.pet.name, fetched.name) - self.assertEqual(self.pet.status, fetched.status) + self.assertEqual(name, fetched.name) + self.assertEqual(status, fetched.status) def test_upload_file(self): try: