2022-Spring-NYU-DevOps-Shopcarts / shopcarts

Shopcarts squad.
Apache License 2.0
2 stars 2 forks source link

update item #71

Closed yjjw closed 2 years ago

yjjw commented 2 years ago

Update an item in the shopcart. The request body can contain either "price" or "quantity", or both.

kdokm commented 2 years ago

Sorry but it seems like the indent levels of some methods are not right in test_routes.

kdokm commented 2 years ago

Sorry but it seems like the indent levels of some methods are not right in test_routes.

Actually, what @TimothyXu asked is because of this. After I fixed the indent levels, it raises 'UnboundLocalError: local variable 'price' referenced before assignment' and the test coverage boosts from 86 to 99. Also, the return code for success should be 200 instead of 201. I fixed it and will start a pull request soon.

TimothyXu commented 2 years ago

Thank you very much for both the bug fix and catching this and answering me! @kdokm

TimothyXu commented 2 years ago

And also that is my bad sorry, I shouldn't have approved this since the test coverage was not up to 95%. I forgot to check that