Path:
tests/end2end/project_options/server_host/02_option_specified/test_case.py
Lines:
34
Non-empty lines:
27
Non-empty lines covered with requirements:
27 / 27 (100.0%)
Functions:
2
Functions covered by requirements:
2 / 2 (100.0%)
1
"""2
@relation(SDOC-SRS-119, scope=file)3
"""4
5
import os
6
7
from tests.end2end.e2e_case import E2ECase
8
from tests.end2end.helpers.screens.project_index.screen_project_index import (
9
Screen_ProjectIndex,
10
)11
from tests.end2end.server import SDocTestServer
12
13
path_to_this_test_file_folder = os.path.dirname(os.path.abspath(__file__))
14
15
16
class Test(E2ECase):
17
def test(self):
18
custom_server_stderr_expectations = [
19
"INFO: Application startup complete.",
20
"INFO: Uvicorn running on http://localhost:5123 (Press CTRL+C to quit)",
21
]22
23
with SDocTestServer(
24
input_path=path_to_this_test_file_folder,
25
expectations=custom_server_stderr_expectations,
26
port=5123,
27
) as test_server:
28
self.open(test_server.get_host_and_port())
29
30
screen_project_index = Screen_ProjectIndex(self)
31
screen_project_index.assert_on_screen()
32
screen_project_index.assert_header_project_name(
33
'Test project with a host "localhost" and a port 51000'34
)