Skip to content

Commit

Permalink
Remove dev api instance requirement from some tests
Browse files Browse the repository at this point in the history
The patches are now in prod
  • Loading branch information
cjh1 committed Dec 16, 2024
1 parent 1c72f86 commit fad0f2e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 36 deletions.
27 changes: 4 additions & 23 deletions tests/test_jobs.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,22 +52,13 @@ def test_complete_timeout(authenticated_client, test_job_path, test_machine):
job.complete(timeout=10)


@pytest.mark.api_dev
def test_job_monitor_check_request(
mocker,
dev_client_id,
dev_client_secret,
authenticated_client,
test_job_path,
test_machine,
dev_api_url,
dev_token_url,
):
with Client(
client_id=dev_client_id,
secret=dev_client_secret,
api_base_url=dev_api_url,
token_url=dev_token_url,
) as client:
with authenticated_client as client:
num_jobs = 10
_fetch_jobs = mocker.patch("sfapi_client._monitor._fetch_jobs")

Expand Down Expand Up @@ -122,24 +113,14 @@ def _jobs(*arg, **kwargs):
assert len(ids) == num_jobs


# We currently run this in api-dev as its a new feature deployed there
@pytest.mark.api_dev
def test_job_monitor_multiple_threads(
dev_client_id,
dev_client_secret,
authenticated_client,
test_job_path,
test_machine,
dev_api_url,
dev_token_url,
):
num_jobs = 5

with Client(
client_id=dev_client_id,
secret=dev_client_secret,
api_base_url=dev_api_url,
token_url=dev_token_url,
) as client:
with authenticated_client as client:
machine = client.compute(test_machine)

jobs = []
Expand Down
16 changes: 3 additions & 13 deletions tests/test_jobs_async.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,23 +162,13 @@ async def test_job_monitor_job_types(async_authenticated_client, mocker, test_ma
assert kwargs["job_type"] == AsyncJobSacct


# We currently run this in api-dev as its a new feature deployed there
@pytest.mark.api_dev
@pytest.mark.asyncio
async def test_job_monitor_gather(
dev_client_id,
dev_client_secret,
async_authenticated_client,
test_job_path,
test_machine,
dev_api_url,
dev_token_url,
test_machine
):
async with AsyncClient(
client_id=dev_client_id,
secret=dev_client_secret,
api_base_url=dev_api_url,
token_url=dev_token_url,
) as client:
async with async_authenticated_client as client:
machine = await client.compute(test_machine)

submit_tasks = []
Expand Down

0 comments on commit fad0f2e

Please sign in to comment.