Skip to content

Commit acf268c

Browse files
committed
tests: remove context from quotas in tests
1 parent ad61f21 commit acf268c

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

backend/btrixcloud/subs.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,8 +278,10 @@ def _get_sub_by_type_from_data(self, data: dict[str, object]) -> Union[
278278
return SubscriptionUpdateOut(**data)
279279
if data["type"] == "add-minutes":
280280
return SubscriptionAddMinutesOut(**data)
281+
if data["type"] == "cancel":
282+
return SubscriptionCancelOut(**data)
281283

282-
return SubscriptionCancelOut(**data)
284+
raise HTTPException(status_code=500, detail="unknown sub event")
283285

284286
# pylint: disable=too-many-arguments
285287
async def list_sub_events(

backend/test/test_org_subs.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -508,7 +508,6 @@ def test_subscription_events_log(admin_auth_headers, non_default_org_id):
508508
"planId": "basic2",
509509
"futureCancelDate": None,
510510
"quotas": {
511-
"context": None,
512511
"maxPagesPerCrawl": 50,
513512
"storageQuota": 500000,
514513
"extraExecMinutes": None,
@@ -577,7 +576,6 @@ def test_subscription_events_log_filter_sub_id(admin_auth_headers):
577576
"planId": "basic2",
578577
"futureCancelDate": None,
579578
"quotas": {
580-
"context": None,
581579
"maxPagesPerCrawl": 50,
582580
"storageQuota": 500000,
583581
"extraExecMinutes": None,
@@ -639,7 +637,6 @@ def test_subscription_events_log_filter_oid(admin_auth_headers):
639637
"planId": "basic2",
640638
"futureCancelDate": None,
641639
"quotas": {
642-
"context": None,
643640
"maxPagesPerCrawl": 50,
644641
"storageQuota": 500000,
645642
"extraExecMinutes": None,
@@ -675,7 +672,6 @@ def test_subscription_events_log_filter_plan_id(admin_auth_headers):
675672
"planId": "basic2",
676673
"futureCancelDate": None,
677674
"quotas": {
678-
"context": None,
679675
"maxPagesPerCrawl": 50,
680676
"storageQuota": 500000,
681677
"extraExecMinutes": None,
@@ -727,7 +723,6 @@ def test_subscription_events_log_filter_status(admin_auth_headers):
727723
"planId": "basic2",
728724
"futureCancelDate": None,
729725
"quotas": {
730-
"context": None,
731726
"maxPagesPerCrawl": 50,
732727
"storageQuota": 500000,
733728
"extraExecMinutes": None,

0 commit comments

Comments
 (0)