CSCI-GA-2820-SU23-001 / shopcarts

NYU DevOps Shopcarts Service Summer 2023
Apache License 2.0
4 stars 4 forks source link

Setup unittests for restx refactoring #139

Closed wl2484 closed 1 year ago

wl2484 commented 1 year ago

Goal

Reorganize test cases for flask-restx refactoring. After adopting this change, test case fixes required for flask-restx refactoring would generally be changing the base_url value.

Changes

  1. Add BaseTestCase class with class variable base_url
  2. Remove duplicate tests
  3. Add create shopcart happy path test case for the sake of test coverage
  4. Retire global variable NONEXIST_SHOPCART_ID in test_routes.py
  5. Declare and apply DEFAULT_CONTENT_TYPE in tests
codecov[bot] commented 1 year ago

Codecov Report

Patch and project coverage have no change.

Comparison is base (69439b8) 98.98% compared to head (28590b1) 98.98%.

:exclamation: Current head 28590b1 differs from pull request most recent head c8315f1. Consider uploading reports for the commit c8315f1 to get more accurate results

Additional details and impacted files ```diff @@ Coverage Diff @@ ## sc84_swagger_item_model #139 +/- ## ======================================================== Coverage 98.98% 98.98% ======================================================== Files 8 8 Lines 393 393 ======================================================== Hits 389 389 Misses 4 4 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.