@@ -18,11 +18,13 @@ def api_client():
1818def test_service_info (api_client : TestClient ):
1919 response = api_client .get ("/service_info" )
2020 assert response .status_code == 200
21+ EXPECTED_VERSION_PATTERN = r"\d\.\d\."
2122 response_json = response .json ()
2223 assert response_json ["id" ] == "org.genomicmedlab.{{ cookiecutter.project_slug }}"
2324 assert response_json ["name" ] == "{{ cookiecutter.project_slug }}"
2425 assert response_json ["type" ]["group" ] == "org.genomicmedlab"
2526 assert response_json ["type" ]["artifact" ] == "{{ cookiecutter.project_slug }} API"
27+ assert re .match (EXPECTED_VERSION_PATTERN , response_json ["type" ]["version" ])
2628 assert response_json ["description" ] == "{{ cookiecutter.description }}"
2729 assert response_json ["organization" ] == {
2830 "name" : "Genomic Medicine Lab at Nationwide Children's Hospital" ,
@@ -35,13 +37,4 @@ def test_service_info(api_client: TestClient):
3537 )
3638 assert datetime .fromisoformat (response_json ["createdAt" ])
3739 assert ServiceEnvironment (response_json ["environment" ])
38-
39-
40- def test_service_info_version (api_client : TestClient ):
41- """Early in development, we expect `__version__` to be None, but it shouldn't be
42- once a version tag is made. Therefore, this test is broken out so that it can be easily
43- ignored while initial development is ongoing.
44- """
45- response_json = api_client .get ("/service_info" ).json ()
46- assert re .match (r"\d\.\d\.\d\." , response_json ["type" ]["version" ])
47- assert re .match (r"\d\.\d\.\d\." , response_json ["version" ])
40+ assert re .match (EXPECTED_VERSION_PATTERN , response_json ["version" ])
0 commit comments