Skip to content

Commit bbdca62

Browse files
committed
checkpoint: contact unit test
1 parent 67effab commit bbdca62

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

tuttle_tests/test_model.py

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -81,16 +81,18 @@ def test_user():
8181

8282

8383
class TestContact:
84-
def test_valid_contact_instantiation(self):
85-
contact = Contact(
86-
first_name="Sam",
87-
last_name="Lowry",
88-
89-
company="Ministry of Information",
84+
def test_valid_instantiation(self):
85+
contact = Contact.validate(
86+
dict(
87+
first_name="Sam",
88+
last_name="Lowry",
89+
90+
company="Ministry of Information",
91+
)
9092
)
9193
assert store_and_retrieve(contact)
9294

93-
def test_invalid_email_instantiation(self):
95+
def test_invalid_email(self):
9496
with pytest.raises(ValidationError):
9597
Contact.validate(
9698
dict(

0 commit comments

Comments
 (0)