2022-Spring-NYU-DevOps-Shopcarts / shopcarts

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

fix query #140

Closed kdokm closed 2 years ago

kdokm commented 2 years ago

Hi, I have found that the error mentioned in #137 is actually in model.py, though it's strange that this error is not caught by nosetests. Also, because we want to restrict only numbers can be put in the item id text box, I do not include invalid item id bdd test.

codecov-commenter commented 2 years ago

Codecov Report

Merging #140 (fc45abc) into main (083fc1d) will increase coverage by 0.11%. The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #140      +/-   ##
==========================================
+ Coverage   99.11%   99.23%   +0.11%     
==========================================
  Files           7        7              
  Lines         453      524      +71     
==========================================
+ Hits          449      520      +71     
  Misses          4        4              
Impacted Files Coverage Δ
service/models.py 100.00% <100.00%> (ø)
service/routes.py 100.00% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 083fc1d...fc45abc. Read the comment docs.

yjjw commented 2 years ago

Hi, I have found that the error mentioned in #137 is actually in model.py, though it's strange that this error is not caught by nosetests. Also, because we want to restrict only numbers can be put in the item id text box, I do not include invalid item id bdd test.

Ah I see! I was thinking about the same idea but do not get a right way to change the model query function. I should have thought about borrowing the idea of with_entitys(). Thank you so much for your time and work!

Adora2401 commented 2 years ago

Hi, I have found that the error mentioned in #137 is actually in model.py, though it's strange that this error is not caught by nosetests. Also, because we want to restrict only numbers can be put in the item id text box, I do not include invalid item id bdd test.

Thanks Yuwen! I have reviewed the solution.