Skip to content

Commit f48a2f2

Browse files
authored
remove unnecessary client.py test arguments (#70)
1 parent 30a760a commit f48a2f2

File tree

1 file changed

+9
-29
lines changed

1 file changed

+9
-29
lines changed

tests/unit/test_client.py

Lines changed: 9 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ def test_client_project_context__raises():
4949
client._required_user_context(override_context=None)
5050

5151

52-
def test_client_search(client, httpx_mock, auth_token):
52+
def test_client_search(client, httpx_mock):
5353
id1 = uuid.uuid4()
5454
id2 = uuid.uuid4()
5555

@@ -76,7 +76,7 @@ def test_client_search(client, httpx_mock, auth_token):
7676

7777

7878
@patch("entitysdk.route.get_route_name")
79-
def test_client_nupdate(mocked_route, client, httpx_mock, auth_token):
79+
def test_client_nupdate(mocked_route, client, httpx_mock):
8080
class Foo(Identifiable):
8181
name: str
8282

@@ -135,8 +135,6 @@ def test_client_upload_file(
135135
client,
136136
httpx_mock,
137137
api_url,
138-
project_context,
139-
auth_token,
140138
request_headers,
141139
):
142140
entity_id = uuid.uuid4()
@@ -164,9 +162,7 @@ def test_client_upload_file(
164162
assert res.id == asset_id
165163

166164

167-
def test_client_upload_content(
168-
client, httpx_mock, api_url, project_context, auth_token, request_headers
169-
):
165+
def test_client_upload_content(client, httpx_mock, api_url, request_headers):
170166
entity_id = uuid.uuid4()
171167
asset_id = uuid.uuid4()
172168

@@ -196,9 +192,7 @@ def test_client_upload_content(
196192
assert res.id == asset_id
197193

198194

199-
def test_client_download_content(
200-
client, httpx_mock, api_url, project_context, auth_token, request_headers
201-
):
195+
def test_client_download_content(client, httpx_mock, api_url, request_headers):
202196
entity_id = uuid.uuid4()
203197
asset_id = uuid.uuid4()
204198

@@ -222,8 +216,6 @@ def test_client_download_file__output_file(
222216
client,
223217
httpx_mock,
224218
api_url,
225-
project_context,
226-
auth_token,
227219
request_headers,
228220
):
229221
entity_id = uuid.uuid4()
@@ -258,8 +250,6 @@ def test_client_download_file__output_file__inconsistent_ext(
258250
client,
259251
httpx_mock,
260252
api_url,
261-
project_context,
262-
auth_token,
263253
request_headers,
264254
):
265255
"""User must provide a path extension that is consitent with the asset path."""
@@ -291,8 +281,6 @@ def test_client_download_file__output_file__user_subdirectory_path(
291281
client,
292282
httpx_mock,
293283
api_url,
294-
project_context,
295-
auth_token,
296284
request_headers,
297285
):
298286
"""User provides a nested output path that overrides the asset path."""
@@ -330,8 +318,6 @@ def test_client_download_file__asset_subdirectory_paths(
330318
client,
331319
httpx_mock,
332320
api_url,
333-
project_context,
334-
auth_token,
335321
request_headers,
336322
):
337323
"""User provides directory, relative file paths from assets are written to it."""
@@ -389,8 +375,6 @@ def test_client_get(
389375
client,
390376
httpx_mock,
391377
api_url,
392-
project_context,
393-
auth_token,
394378
request_headers,
395379
):
396380
entity_id = uuid.uuid4()
@@ -445,8 +429,6 @@ def test_client_delete_asset(
445429
client,
446430
httpx_mock,
447431
api_url,
448-
project_context,
449-
auth_token,
450432
request_headers,
451433
):
452434
mock_route.return_value = "reconstruction-morphology"
@@ -478,8 +460,6 @@ def test_client_update_asset(
478460
client,
479461
httpx_mock,
480462
api_url,
481-
project_context,
482-
auth_token,
483463
request_headers,
484464
):
485465
mock_route.return_value = "reconstruction-morphology"
@@ -517,7 +497,7 @@ def test_client_update_asset(
517497

518498

519499
def test_client_download_assets(
520-
tmp_path, api_url, client, project_context, auth_token, request_headers, httpx_mock
500+
tmp_path, api_url, client, project_context, request_headers, httpx_mock
521501
):
522502
entity_id = uuid.uuid4()
523503
asset1_id = uuid.uuid4()
@@ -564,7 +544,7 @@ def test_client_download_assets(
564544

565545

566546
def test_client_download_assets__no_assets_raise(
567-
tmp_path, api_url, client, project_context, auth_token, request_headers, httpx_mock
547+
tmp_path, api_url, client, project_context, request_headers, httpx_mock
568548
):
569549
entity_id = uuid.uuid4()
570550

@@ -585,7 +565,7 @@ def test_client_download_assets__no_assets_raise(
585565

586566

587567
def test_client_download_assets__non_entity(
588-
tmp_path, api_url, client, project_context, auth_token, request_headers, httpx_mock
568+
tmp_path, api_url, client, project_context, request_headers, httpx_mock
589569
):
590570
entity_id = uuid.uuid4()
591571

@@ -606,7 +586,7 @@ def test_client_download_assets__non_entity(
606586

607587

608588
def test_client_download_assets__directory_not_supported(
609-
tmp_path, api_url, client, project_context, auth_token, request_headers, httpx_mock
589+
tmp_path, api_url, client, project_context, request_headers, httpx_mock
610590
):
611591
entity_id = uuid.uuid4()
612592
asset_id = uuid.uuid4()
@@ -630,7 +610,7 @@ def test_client_download_assets__directory_not_supported(
630610

631611

632612
def test_client_download_assets__entity(
633-
tmp_path, api_url, client, project_context, auth_token, request_headers, httpx_mock
613+
tmp_path, api_url, client, project_context, request_headers, httpx_mock
634614
):
635615
entity_id = uuid.uuid4()
636616
asset_id = uuid.uuid4()

0 commit comments

Comments
 (0)