Added functionality for testing with config files.

This commit is contained in:
2022-06-19 00:15:17 -04:00
parent f761cbf56c
commit 8701adbd57
3 changed files with 45 additions and 38 deletions

View File

@@ -10,10 +10,10 @@ def create_server():
"""Set up a server."""
@given("it is not using localhost")
def set_server_address(server):
"""Sets tthe server to not use localhost."""
server.set_to_host_ip()
@given("environment variables are used")
def set_use_environment(server):
"""Sets up the process for environment variables."""
server.use_config = False
@given("port is changed to something different")
@@ -31,7 +31,7 @@ def start_server(server):
@when("the home page is accessed")
def access_home_page(server, page):
"""Access the home page."""
url = f"http://{server.address}:{server.port}/"
url = f"http://{server.base_url}/"
page.request_url(url)