Closed yjjw closed 2 years ago
Sorry but it seems like the indent levels of some methods are not right in test_routes.
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.
Thank you very much for both the bug fix and catching this and answering me! @kdokm
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
Update an item in the shopcart. The request body can contain either "price" or "quantity", or both.