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 92862b8 commit d2acf20Copy full SHA for d2acf20
tuttle_tests/test_model.py
@@ -122,6 +122,19 @@ def test_valid_instantiation(self):
122
)
123
assert store_and_retrieve(client)
124
125
+ def test_missing_name(self):
126
+ """Test that a ValidationError is raised when the name is missing."""
127
+ with pytest.raises(ValidationError):
128
+ Client.validate(dict())
129
+
130
+ try:
131
+ client = Client.validate(dict())
132
+ except ValidationError as ve:
133
+ for error in ve.errors():
134
+ field_name = error.get("loc")[0]
135
+ error_message = error.get("msg")
136
+ assert field_name == "name"
137
138
def test_missing_fields_instantiation(self):
139
with pytest.raises(ValidationError):
140
Client.validate(dict())
0 commit comments