Skip to content

Commit bcd8fa0

Browse files
committed
fix: Update tests for new zone defaults and auto-create behavior
1 parent ae3e74e commit bcd8fa0

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

tests/integration/test_client_integration.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ async def test_connection_with_valid_token(self, async_client):
5454
@pytest.mark.asyncio
5555
async def test_connection_with_invalid_token(self):
5656
"""Test connection returns False with invalid token."""
57-
client = BrightDataClient(token="invalid_token_123456789")
57+
client = BrightDataClient(token="invalid_token_123456789", auto_create_zones=False)
5858

5959
async with client:
6060
# test_connection() never raises - returns False for invalid tokens
@@ -104,7 +104,7 @@ async def test_get_account_info_returns_zones(self, async_client):
104104
@pytest.mark.asyncio
105105
async def test_get_account_info_with_invalid_token(self):
106106
"""Test getting account info fails with invalid token."""
107-
client = BrightDataClient(token="invalid_token_123456789")
107+
client = BrightDataClient(token="invalid_token_123456789", auto_create_zones=False)
108108

109109
async with client:
110110
with pytest.raises(AuthenticationError) as exc_info:
@@ -192,7 +192,7 @@ class TestClientErrorHandling:
192192
@pytest.mark.asyncio
193193
async def test_connection_test_returns_false_on_network_error(self):
194194
"""Test connection test returns False (not exception) on network errors."""
195-
client = BrightDataClient(token="test_token_123456789")
195+
client = BrightDataClient(token="test_token_123456789", auto_create_zones=False)
196196

197197
async with client:
198198
# Should return False, not raise exception

tests/unit/test_client.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ class TestClientInitialization:
1313
def test_client_with_explicit_token(self):
1414
"""Test client initialization with explicit token."""
1515
client = BrightDataClient(token="test_token_123456789")
16-
16+
1717
assert client.token == "test_token_123456789"
1818
assert client.timeout == 30 # Default timeout
19-
assert client.web_unlocker_zone == "web_unlocker1"
20-
assert client.serp_zone == "serp_api1"
21-
assert client.browser_zone == "browser_api1"
19+
assert client.web_unlocker_zone == "sdk_unlocker"
20+
assert client.serp_zone == "sdk_serp"
21+
assert client.browser_zone == "sdk_browser"
2222

2323
def test_client_with_custom_config(self):
2424
"""Test client with custom configuration."""

0 commit comments

Comments
 (0)