Skip to content

Commit 942a91e

Browse files
committed
fmt
1 parent 030e22d commit 942a91e

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

tests/test_jobs_mixin.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ def make_getrun_path_pattern(run_id: int, page_token: str) -> Pattern[str]:
1010
rf'{re.escape("http://localhost/api/")}2.\d{re.escape(f"/jobs/runs/get?page_token={page_token}&run_id={run_id}")}'
1111
)
1212

13+
1314
def make_getjob_path_pattern(job_id: int, page_token: Optional[str] = None) -> Pattern[str]:
1415
if page_token:
1516
return re.compile(
@@ -19,6 +20,7 @@ def make_getjob_path_pattern(job_id: int, page_token: Optional[str] = None) -> P
1920
return re.compile(
2021
rf'{re.escape("http://localhost/api/")}2.\d{re.escape(f"/jobs/get?job_id={job_id}")}')
2122

23+
2224
def make_listjobs_path_pattern(page_token: str) -> Pattern[str]:
2325
return re.compile(
2426
rf'{re.escape("http://localhost/api/")}2.\d{re.escape(f"/jobs/list")}\?(?:expand_tasks=(?:true|false)&)?page_token={re.escape(page_token)}'
@@ -270,6 +272,7 @@ def test_get_job_pagination_with_tasks(config, requests_mock):
270272
}
271273
}
272274

275+
273276
def test_list_jobs_without_task_expansion(config, requests_mock):
274277
listjobs_page1 = {
275278
"jobs": [{
@@ -343,6 +346,7 @@ def test_list_jobs_without_task_expansion(config, requests_mock):
343346
# only two requests should be made which are jobs/list requests
344347
assert requests_mock.call_count == 2
345348

349+
346350
def test_list_jobs_with_many_tasks(config, requests_mock):
347351
from databricks.sdk.service import compute, jobs
348352
cluster_spec = compute.ClusterSpec(spark_version="11.3.x-scala2.12",
@@ -393,7 +397,8 @@ def test_list_jobs_with_many_tasks(config, requests_mock):
393397
}]
394398
}
395399
}],
396-
"next_page_token": "tokenToSecondPage"
400+
"next_page_token":
401+
"tokenToSecondPage"
397402
}
398403
listjobs_page2 = {
399404
"jobs": [{

0 commit comments

Comments
 (0)