def test_valid_format_is_returned(self, valid_fax_info): valid_return = ( "Child Name: Banjo Edelman\nChild DOB: 08/01/2010\n" "School District: KCP 33\nSchool Name: Faxon Elementary " "School\nSchool Fax: 555-555-5556\nRequestor Name: Rachel " "Edelman\nRequestor Contact Info: 555-555-5555" ) method_return = create_faxio_string(valid_fax_info) assert valid_return == method_return
def test_required_keys(self, removed_field, valid_fax_info): del valid_fax_info[removed_field] with pytest.raises(ValueError): string_body = create_faxio_string(valid_fax_info)
def test_input_requires_dictionary(self): with pytest.raises(ValueError): string_body = create_faxio_string({})