File tree Expand file tree Collapse file tree 4 files changed +13
-7
lines changed Expand file tree Collapse file tree 4 files changed +13
-7
lines changed Original file line number Diff line number Diff line change 21
21
from .routers import router_root
22
22
from .broker import broker
23
23
24
- from .schema .ext import RootResponse
24
+ from .dto .ext import RootResponse
25
25
26
26
27
27
def generate_operation_id (route : APIRoute ) -> str :
Original file line number Diff line number Diff line change 1
1
""" TaskIQ broker configuration
2
2
3
3
"""
4
+ import os
4
5
5
6
from .settings import settings
6
7
Original file line number Diff line number Diff line change 1
- import pytest
1
+ import pytest
2
2
3
3
from fastapi import status
4
4
from fastapi .testclient import TestClient
5
5
from fastapi .security import OAuth2PasswordRequestForm
6
6
7
- from labs .schema .auth import Token , SignupRequest , SignupResponse
7
+ from labs .dto .auth import Token , SignupRequest , SignupResponse
8
+
8
9
9
10
@pytest .fixture ()
10
11
def signup_request (faker ):
@@ -15,10 +16,11 @@ def signup_request(faker):
15
16
last_name = faker .last_name (),
16
17
)
17
18
19
+
18
20
def test_signup (test_client , signup_request ):
19
21
20
22
response = test_client .post (
21
- "/signup" ,
23
+ "/signup" ,
22
24
json = signup_request .dict ()
23
25
)
24
26
@@ -32,8 +34,10 @@ def test_signup(test_client, signup_request):
32
34
assert response .status_code == status .HTTP_201_CREATED
33
35
assert parsed_body == expected_response
34
36
37
+
35
38
def test_verify (test_client ):
36
39
assert 1 == 1
37
40
41
+
38
42
def test_login (test_client , signup_request ):
39
43
assert 1 == 1
Original file line number Diff line number Diff line change 1
1
from fastapi import status
2
2
3
- from labs .schema .ext import EchoResponse
3
+ from labs .dto .ext import EchoResponse
4
+
4
5
5
6
def test_echo (test_client ):
6
-
7
+
7
8
response = test_client .get ("/ext/echo" )
8
9
parsed_response = EchoResponse .parse_obj (response .json ())
9
-
10
+
10
11
expected_response = EchoResponse (
11
12
message = "Hello World"
12
13
)
You can’t perform that action at this time.
0 commit comments