Skip to content

Commit

Permalink
Fix failing test
Browse files Browse the repository at this point in the history
  • Loading branch information
zachaysan committed Oct 8, 2024
1 parent 4d641f6 commit cde028e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion api/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
from rest_framework.authtoken.models import Token
from rest_framework.test import APIClient
from task_processor.task_run_method import TaskRunMethod
from urllib3 import HTTPResponse
from urllib3.connectionpool import HTTPConnectionPool
from xdist import get_xdist_worker_id

Expand Down Expand Up @@ -163,7 +164,7 @@ def urlopen_mock(
url: str,
*args,
**kwargs,
) -> HTTPConnectionPool.ResponseCls:
) -> HTTPResponse:
if self.host in allowed_hosts:
return original_urlopen(self, method, url, *args, **kwargs)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ def test_should_return_segment_config_list_when_requested(
response = admin_client.get(url)

# Then
expected_response = {"api_key": config.api_key, "id": config.id}
expected_response = {"api_key": config.api_key, "id": config.id, "base_url": None}
assert response.status_code == status.HTTP_200_OK
assert response.data == [expected_response]

Expand Down

0 comments on commit cde028e

Please sign in to comment.