コード例 #1
0
ファイル: phaxio_test.py プロジェクト: codeforamerica/vaxfax
 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
コード例 #2
0
ファイル: phaxio_test.py プロジェクト: codeforamerica/vaxfax
 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)
コード例 #3
0
ファイル: phaxio_test.py プロジェクト: codeforamerica/vaxfax
 def test_input_requires_dictionary(self):
     with pytest.raises(ValueError):
         string_body = create_faxio_string({})