def test_project_schema_dump_one_dict_many_false(project_schema: ProjectSchema, deserialized_project: Project, serialized_project: dict): assert project_schema.dump(deserialized_project) == serialized_project
def test_project_schema_dump_list_no_empty_many_true( project_schema: ProjectSchema, deserialized_project: Project): assert len(project_schema.dump([deserialized_project], many=True)) == 1
def test_project_schema_dump_list_of_dicts_many_true( project_schema: ProjectSchema, deserialized_project: Project): assert type(project_schema.dump([deserialized_project], many=True)[0]) is dict
def test_project_schema_dump_one_dict_many_true(project_schema: ProjectSchema, deserialized_project: Project, serialized_project: dict): assert project_schema.dump([deserialized_project], many=True) == [serialized_project]