Skip to content

Commit

Permalink
Fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
cisc0f committed Apr 30, 2024
1 parent 5054d84 commit 1afaf56
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions tests/test_routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,8 +181,8 @@ def test_update_shopcart(self):
"user_id"
], # Assuming user_id can be updated or is needed for identification
"name": "Updated Name",
"total_price": float(new_shopcart["total_price"])
+ float(100), # Example of updating the price
"total_price": new_shopcart["total_price"]
+ 100, # Example of updating the price
# Include updates to other fields here
"status": new_shopcart["status"],
}
Expand All @@ -197,7 +197,8 @@ def test_update_shopcart(self):
# Verify that all fields have been updated correctly
self.assertEqual(updated_shopcart["name"], update_payload["name"])
self.assertEqual(
updated_shopcart["total_price"], float(update_payload["total_price"])
round(updated_shopcart["total_price"], 2),
round(float(update_payload["total_price"]), 2),
)

def test_update_shop_cart_with_invalid_fields(self):
Expand Down

0 comments on commit 1afaf56

Please sign in to comment.