nyu-devops-team / customers

The customers resource is a representation of the customer accounts of the eCommerce site
2 stars 1 forks source link

Create service for get customer by ID. #31

Closed eaglet closed 3 years ago

eaglet commented 3 years ago

Create a service to get customers by ID.

nancywen25 commented 3 years ago

One of the tests seem to be failing:

(venv) vagrant@flask-tdd:/vagrant$ nosetests

Test Cases for Customer Model

REST API Server Tests

====================================================================== ERROR: Get a single Customer

Traceback (most recent call last): File "/vagrant/tests/test_service.py", line 88, in test_get_customer test_customer = self._create_customers(1)[0] File "/vagrant/tests/test_service.py", line 108, in _create_customers "/customers", json=test_pet.serialize(), content_type="application/json" NameError: name 'test_pet' is not defined

====================================================================== FAIL: Find a Customer by ID

Traceback (most recent call last): File "/vagrant/tests/test_models.py", line 138, in test_find_customer self.assertEqual(result.last_name, "world") AssertionError: 'yoyoyo' != 'world'


XML: /vagrant/unittests.xml Name Stmts Miss Cover Missing

service/init.py 25 4 84% 30, 39-42 service/models.py 44 2 95% 60, 91 service/service.py 62 18 71% 37, 43-44, 67-68, 81-82, 95-96, 134, 163-169, 208-209

TOTAL 131 24 82%

Ran 9 tests in 0.823s

FAILED (errors=1, failures=1)

nancywen25 commented 3 years ago

Fixed merge conflict issues and merged