Skip to content

Commit

Permalink
formatting fixes in test_client
Browse files Browse the repository at this point in the history
  • Loading branch information
jewelltaylor committed Apr 11, 2024
1 parent 0169ab4 commit b1d2294
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions florist/tests/unit/api/test_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,14 @@ def test_start_success(mock_launch_client: Mock) -> None:
test_redis_host = "test-redis-host"
test_redis_port = "test-redis-port"

response = client.start(test_server_address, test_client,
test_data_path, test_redis_host, test_redis_port)
response = client.start(test_server_address, test_client, test_data_path, test_redis_host, test_redis_port)

assert response.status_code == 200
json_body = json.loads(response.body.decode())
assert json_body == {"uuid": ANY}

log_file_name = str(get_client_log_file_path(json_body["uuid"]))
mock_launch_client.assert_called_once_with(
ANY, test_server_address, log_file_name)
mock_launch_client.assert_called_once_with(ANY, test_server_address, log_file_name)

client_obj = mock_launch_client.call_args_list[0][0][0]
assert isinstance(client_obj, MnistClient)
Expand All @@ -54,8 +52,7 @@ def test_start_fail_unsupported_client() -> None:
test_redis_host = "test-redis-host"
test_redis_port = "test-redis-port"

response = client.start(test_server_address, test_client,
test_data_path, test_redis_host, test_redis_port)
response = client.start(test_server_address, test_client, test_data_path, test_redis_host, test_redis_port)

assert response.status_code == 400
json_body = json.loads(response.body.decode())
Expand All @@ -71,8 +68,7 @@ def test_start_fail_exception(mock_launch_client: Mock) -> None:
test_redis_host = "test-redis-host"
test_redis_port = "test-redis-port"

response = client.start(test_server_address, test_client,
test_data_path, test_redis_host, test_redis_port)
response = client.start(test_server_address, test_client, test_data_path, test_redis_host, test_redis_port)

assert response.status_code == 500
json_body = json.loads(response.body.decode())
Expand Down

0 comments on commit b1d2294

Please sign in to comment.