Skip to content

Commit 29694db

Browse files
committed
include reset back to prev value in "add to quota" test
1 parent 125f962 commit 29694db

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

backend/test_nightly/test_execution_minutes_quota.py

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
import math
2-
import requests
32
import time
4-
import pytest
5-
63
from typing import Dict
74

5+
import pytest
6+
import requests
7+
88
from .conftest import API_PREFIX
99
from .utils import get_crawl_status
1010

11-
1211
EXEC_MINS_QUOTA = 1
1312
EXEC_SECS_QUOTA = EXEC_MINS_QUOTA * 60
1413
GIFTED_MINS_QUOTA = 3
@@ -145,6 +144,15 @@ def test_add_execution_mins_extra_quotas(
145144
assert update["update"]
146145
assert data["quotaUpdates"][-1]["context"] == "test context 123"
147146

147+
# Reset back to previous value
148+
r = requests.post(
149+
f"{API_PREFIX}/orgs/{org_with_quotas}/quotas",
150+
headers=admin_auth_headers,
151+
json={
152+
"extraExecMinutes": EXTRA_MINS_QUOTA,
153+
},
154+
)
155+
148156

149157
@pytest.mark.timeout(1200)
150158
def test_crawl_stopped_when_quota_reached_with_extra(

0 commit comments

Comments
 (0)