add email to Person.all_names and Config.all_names
[utils.git] / src / budget_sync / test / test_config.py
index 6a40c18c30237abb11bd2a9e1c4114120b7d2646..156aa392641d18021514b1ba2facc1b6b61264bf 100644 (file)
@@ -170,9 +170,37 @@ class TestConfig(unittest.TestCase):
             aliases = ["a"]
             output_markdown_file = "person2.mdwn"
             """,
-            "alias is not allowed to be the same as another person's alias: "
-            "in person entry for 'person2': 'a' is also an alias for person "
-            "'person1'")
+            "alias is not allowed to be the same as another person's alias or "
+            "email: in person entry for 'person2': 'a' is also an alias or "
+            "email for person 'person1'")
+        check_error(
+            """
+            bugzilla_url = ""
+            [milestones]
+            [people."person1"]
+            output_markdown_file = "person1.mdwn"
+            aliases = ["abc@example.com"]
+            [people."person2"]
+            email = "abc@example.com"
+            output_markdown_file = "person2.mdwn"
+            """,
+            "email is not allowed to be the same as another person's alias or "
+            "email: in person entry for 'person2': 'abc@example.com' is also "
+            "an alias or email for person 'person1'")
+        check_error(
+            """
+            bugzilla_url = ""
+            [milestones]
+            [people."person2"]
+            email = "abc@example.com"
+            output_markdown_file = "person2.mdwn"
+            [people."person1"]
+            output_markdown_file = "person1.mdwn"
+            aliases = ["abc@example.com"]
+            """,
+            "alias is not allowed to be the same as another person's alias or "
+            "email: in person entry for 'person1': 'abc@example.com' is also "
+            "an alias or email for person 'person2'")
         check_error(
             """
             bugzilla_url = ""