Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
voidZXL committed Apr 6, 2024
1 parent 44764a0 commit 35daf88
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,10 @@ def make_server_thread(backend, port: int = None, **kwargs):
def server_thread(service: UtilMeta):
service.set_backend(backend)
if port:
service.port = port
if service.asynchronous:
service.port = int(f'1{port}')
else:
service.port = port
else:
service.resolve_port()

Expand Down
4 changes: 4 additions & 0 deletions tests/test_api/test_api_fastapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,11 @@

def test_fastapi_api(service, fastapi_server_process):
do_live_api_tests(service)
service._application = None
service.adaptor.app = None


def test_fastapi_api_internal(service, fastapi_server_thread):
do_live_api_tests(service)
service._application = None
service.adaptor.app = None

0 comments on commit 35daf88

Please sign in to comment.