Skip to content

Commit 3e3bcd3

Browse files
authored
Create test_user_contract.py
1 parent 78fa13d commit 3e3bcd3

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

tests/contract/test_user_contract.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
from utils.schemas import UserSchema
2+
3+
def test_user_schema(client):
4+
response = client.get("/getallmanufacturers?format=json")
5+
assert response.status_code == 200
6+
data = response.json().get('Results', [])[0] # Assuming you want the first result
7+
user = UserSchema(**data)
8+
assert user.Mfr_ID == 955
9+
assert isinstance(user.Mfr_ID, int)
10+
assert isinstance(user.Country, str)
11+

0 commit comments

Comments
 (0)