Skip to content

Commit 04b6ee8

Browse files
fix bluetooth tests
1 parent 9898609 commit 04b6ee8

File tree

2 files changed

+10
-9
lines changed

2 files changed

+10
-9
lines changed

tests/conftest.py

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@
3131

3232

3333
@pytest.fixture(scope="session")
34-
def some_domain():
35-
return 'some_domain.test'
34+
def default_domain():
35+
return 'localhost'
3636

3737

3838
@pytest.fixture(scope="session")
@@ -46,11 +46,12 @@ def ssl_domain():
4646

4747

4848
@pytest_asyncio.fixture(scope='session')
49-
def local_http_server(some_domain) -> Generator[LocalHttpServer, None, None]:
49+
def local_http_server(
50+
default_domain) -> Generator[LocalHttpServer, None, None]:
5051
"""
5152
Returns an instance of a LocalHttpServer without SSL pointing to localhost.
5253
"""
53-
server = LocalHttpServer(default_host=some_domain)
54+
server = LocalHttpServer(default_host=default_domain)
5455
yield server
5556

5657
server.clear()
@@ -530,11 +531,11 @@ def url_download(file_name="file-name.txt", content="download content"):
530531

531532

532533
@pytest.fixture
533-
def html(local_http_server, some_domain, another_domain):
534+
def html(local_http_server, default_domain, another_domain):
534535
"""Return a factory for URL with the given content."""
535-
def html(content="", same_origin=True):
536+
def html(content="", host=None, same_origin=True):
536537
if same_origin:
537-
return local_http_server.url_200(host=some_domain, content=content)
538+
return local_http_server.url_200(host=host, content=content)
538539
else:
539540
return local_http_server.url_200(host=another_domain,
540541
content=content)

tests/network/test_network.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ async def test_network_global_subscription_enabled_in_new_context(
148148

149149
@pytest.mark.asyncio
150150
async def test_network_before_request_sent_event_with_cookies_emitted(
151-
websocket, context_id, url_base, url_example, some_domain):
151+
websocket, context_id, url_base, url_example, default_domain):
152152
pytest.xfail(
153153
"TODO: Fix flaky test https://github.com/GoogleChromeLabs/chromium-bidi/issues/2263"
154154
)
@@ -195,7 +195,7 @@ async def test_network_before_request_sent_event_with_cookies_emitted(
195195
"headers": ANY_LIST,
196196
"cookies": AnyOr([
197197
AnyExtending({
198-
"domain": some_domain,
198+
"domain": default_domain,
199199
"httpOnly": False,
200200
"name": "foo",
201201
"path": "/",

0 commit comments

Comments
 (0)