Skip to content

Commit 6a692ae

Browse files
committed
update tests, remove nightly test for removed endpoint
1 parent 40abc2d commit 6a692ae

File tree

2 files changed

+1
-36
lines changed

2 files changed

+1
-36
lines changed

backend/test/test_org_subs.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -959,9 +959,7 @@ def test_subscription_add_minutes(admin_auth_headers):
959959
assert r.status_code == 200
960960
quota_updates = r.json()["quotaUpdates"]
961961
assert len(quota_updates)
962-
last_update = quota_updates[len(quota_updates) - 1]
963-
964-
print(last_update)
962+
last_update = quota_updates[-1]
965963
assert last_update["context"] == "addon"
966964
assert last_update["update"] == {
967965
"maxPagesPerCrawl": 100,

backend/test_nightly/test_execution_minutes_quota.py

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -196,36 +196,3 @@ def test_unset_execution_mins_quota(org_with_quotas, admin_auth_headers):
196196
)
197197
data = r.json()
198198
assert data.get("updated") == True
199-
200-
201-
def test_add_execution_mins_extra_quotas(
202-
org_with_quotas, admin_auth_headers, preshared_secret_auth_headers
203-
):
204-
r = requests.post(
205-
f"{API_PREFIX}/orgs/{org_with_quotas}/quotas/add",
206-
headers=preshared_secret_auth_headers,
207-
json={
208-
"extraExecMinutes": EXTRA_MINS_ADDED_QUOTA,
209-
"context": "test context 123",
210-
},
211-
)
212-
data = r.json()
213-
assert data.get("updated") == True
214-
215-
# Ensure org data looks as we expect
216-
r = requests.get(
217-
f"{API_PREFIX}/orgs/{org_with_quotas}",
218-
headers=admin_auth_headers,
219-
)
220-
data = r.json()
221-
assert (
222-
data["extraExecSecondsAvailable"] == EXTRA_SECS_QUOTA + EXTRA_SECS_ADDED_QUOTA
223-
)
224-
assert data["giftedExecSecondsAvailable"] == GIFTED_SECS_QUOTA
225-
assert data["extraExecSeconds"] == {}
226-
assert data["giftedExecSeconds"] == {}
227-
assert len(data["quotaUpdates"])
228-
for update in data["quotaUpdates"]:
229-
assert update["modified"]
230-
assert update["update"]
231-
assert data["quotaUpdates"][-1]["context"] == "test context 123"

0 commit comments

Comments
 (0)