recopytex/tests/model/test_student.py

17 lines
446 B
Python
Raw Permalink Normal View History

from backend.model.student import Student
from backend.model.tribe import Tribe
from tests.model.fakes import build_tribes
2022-12-27 07:00:28 +00:00
def test_init_student():
tribe = build_tribes(1)[0]
student = Student(name="Bob", tribe=tribe)
print(student)
assert type(student.name) == str
assert type(student.tribe) == Tribe
assert type(student.id) == str
student2 = Student(name="Hop", tribe=tribe)
assert student.id != student2.id