Skip to content

Commit 6447005

Browse files
committed
refactor: various refernces to schema
1 parent 5da8161 commit 6447005

File tree

4 files changed

+13
-7
lines changed

4 files changed

+13
-7
lines changed

src/labs/api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
from .routers import router_root
2222
from .broker import broker
2323

24-
from .schema.ext import RootResponse
24+
from .dto.ext import RootResponse
2525

2626

2727
def generate_operation_id(route: APIRoute) -> str:

src/labs/broker.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
""" TaskIQ broker configuration
22
33
"""
4+
import os
45

56
from .settings import settings
67

src/tests/test_auth.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
1-
import pytest
1+
import pytest
22

33
from fastapi import status
44
from fastapi.testclient import TestClient
55
from fastapi.security import OAuth2PasswordRequestForm
66

7-
from labs.schema.auth import Token, SignupRequest, SignupResponse
7+
from labs.dto.auth import Token, SignupRequest, SignupResponse
8+
89

910
@pytest.fixture()
1011
def signup_request(faker):
@@ -15,10 +16,11 @@ def signup_request(faker):
1516
last_name=faker.last_name(),
1617
)
1718

19+
1820
def test_signup(test_client, signup_request):
1921

2022
response = test_client.post(
21-
"/signup",
23+
"/signup",
2224
json=signup_request.dict()
2325
)
2426

@@ -32,8 +34,10 @@ def test_signup(test_client, signup_request):
3234
assert response.status_code == status.HTTP_201_CREATED
3335
assert parsed_body == expected_response
3436

37+
3538
def test_verify(test_client):
3639
assert 1 == 1
3740

41+
3842
def test_login(test_client, signup_request):
3943
assert 1 == 1

src/tests/test_ext.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
from fastapi import status
22

3-
from labs.schema.ext import EchoResponse
3+
from labs.dto.ext import EchoResponse
4+
45

56
def test_echo(test_client):
6-
7+
78
response = test_client.get("/ext/echo")
89
parsed_response = EchoResponse.parse_obj(response.json())
9-
10+
1011
expected_response = EchoResponse(
1112
message="Hello World"
1213
)

0 commit comments

Comments
 (0)