Skip to content

Commit

Permalink
Minor test improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewelwell committed Aug 19, 2024
1 parent bd37a87 commit 15cf6c5
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def test_chargebee_cache(mocker, db):
"seats": 10,
"api_calls": 100,
"projects": 10,
"some_unknown_key": 1,
"some_unknown_key": 1, # should be ignored
}
plan_id = "plan_id"
plan_items = [
Expand All @@ -70,7 +70,7 @@ def test_chargebee_cache(mocker, db):
"seats": 1,
"api_calls": 10,
"projects": 1,
"some_unknown_key": 1,
"some_unknown_key": 1, # should be ignored
}
addon_id = "addon_id"
addon_items = [
Expand All @@ -92,8 +92,10 @@ def test_chargebee_cache(mocker, db):
assert cache.plans[plan_id].seats == plan_metadata["seats"]
assert cache.plans[plan_id].api_calls == plan_metadata["api_calls"]
assert cache.plans[plan_id].projects == plan_metadata["projects"]
assert not hasattr(cache.plans[plan_id], "some_unknown_key")

assert len(cache.addons) == 1
assert cache.addons[addon_id].seats == addon_metadata["seats"]
assert cache.addons[addon_id].api_calls == addon_metadata["api_calls"]
assert cache.addons[addon_id].projects == addon_metadata["projects"]
assert not hasattr(cache.addons[addon_id], "some_unknown_key")

0 comments on commit 15cf6c5

Please sign in to comment.