31
31
32
32
33
33
@pytest .fixture (scope = "session" )
34
- def some_domain ():
35
- return 'some_domain.test '
34
+ def default_domain ():
35
+ return 'localhost '
36
36
37
37
38
38
@pytest .fixture (scope = "session" )
@@ -46,11 +46,12 @@ def ssl_domain():
46
46
47
47
48
48
@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 ]:
50
51
"""
51
52
Returns an instance of a LocalHttpServer without SSL pointing to localhost.
52
53
"""
53
- server = LocalHttpServer (default_host = some_domain )
54
+ server = LocalHttpServer (default_host = default_domain )
54
55
yield server
55
56
56
57
server .clear ()
@@ -530,11 +531,11 @@ def url_download(file_name="file-name.txt", content="download content"):
530
531
531
532
532
533
@pytest .fixture
533
- def html (local_http_server , some_domain , another_domain ):
534
+ def html (local_http_server , default_domain , another_domain ):
534
535
"""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 ):
536
537
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 )
538
539
else :
539
540
return local_http_server .url_200 (host = another_domain ,
540
541
content = content )
0 commit comments