Skip to content

Commit

Permalink
fixup! Use scheduler to start Everserver
Browse files Browse the repository at this point in the history
  • Loading branch information
oyvindeide committed Nov 13, 2024
1 parent 70c0379 commit 55a55d4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/everest/test_detached.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,21 +58,21 @@ async def test_https_requests(copy_math_func_test_data_to_tmp):
assert ServerStatus.running == server_status["status"]

url, cert, auth = ServerConfig.get_server_context(everest_config.output_dir)
result = requests.get(url, verify=cert, auth=auth, proxies=PROXY)
result = requests.get(url, verify=cert, auth=auth, proxies=PROXY) # noqa: ASYNC210
assert result.status_code == 200 # Request has succeeded

# Test http request fail
url = url.replace("https", "http")
with pytest.raises(Exception): # noqa B017
response = requests.get(url, verify=cert, auth=auth, proxies=PROXY)
response = requests.get(url, verify=cert, auth=auth, proxies=PROXY) # noqa: ASYNC210
response.raise_for_status()

# Test request with wrong password fails
url, cert, _ = ServerConfig.get_server_context(everest_config.output_dir)
usr = "admin"
password = "wrong_password"
with pytest.raises(Exception): # noqa B017
result = requests.get(url, verify=cert, auth=(usr, password), proxies=PROXY)
result = requests.get(url, verify=cert, auth=(usr, password), proxies=PROXY) # noqa: ASYNC210
result.raise_for_status()

# Test stopping server
Expand Down

0 comments on commit 55a55d4

Please sign in to comment.