-
Notifications
You must be signed in to change notification settings - Fork 65
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #324 from lucc/fix-323
Fix yaml conversion of post addresses
- Loading branch information
Showing
5 changed files
with
80 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,6 +20,33 @@ def test_yaml_quoted_special_characters(self): | |
yaml_dump = yaml_editable.to_yaml() | ||
self.assertIn("'@khard'", yaml_dump) | ||
|
||
def test_dumping_multiple_home_addresses_to_yaml(self): | ||
yaml_editable = TestYAMLEditable() | ||
yaml_editable._add_post_address("home", "", "", "street 1", "zip1", | ||
"city1", "", "") | ||
yaml_editable._add_post_address("home", "", "", "street 2", "zip2", | ||
"city2", "", "") | ||
yaml_dump = yaml_editable.to_yaml() | ||
self.assertIn("zip1", yaml_dump) | ||
self.assertIn("zip2", yaml_dump) | ||
|
||
def test_dumping_multiple_home_phone_number_to_yaml(self): | ||
yaml_editable = TestYAMLEditable() | ||
yaml_editable._add_phone_number("home", "1234567890") | ||
yaml_editable._add_phone_number("home", "0987654321") | ||
yaml_dump = yaml_editable.to_yaml() | ||
self.assertIn("1234567890", yaml_dump) | ||
self.assertIn("0987654321", yaml_dump) | ||
|
||
def test_dumping_multiple_home_email_addresses_to_yaml(self): | ||
yaml_editable = TestYAMLEditable() | ||
yaml_editable.add_email("home", "[email protected]") | ||
yaml_editable.add_email("home", "[email protected]") | ||
yaml_dump = yaml_editable.to_yaml() | ||
self.assertIn("home1", yaml_dump) | ||
self.assertIn("home2", yaml_dump) | ||
|
||
|
||
|
||
class ExceptionHandling(unittest.TestCase): | ||
|
||
|