We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 78fa13d commit 3e3bcd3Copy full SHA for 3e3bcd3
tests/contract/test_user_contract.py
@@ -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