From cfbffa2ac1c5b6743705d3cc39d663eb642e7184 Mon Sep 17 00:00:00 2001 From: Abhilash Raj Date: Tue, 14 Apr 2015 17:29:15 -0400 Subject: add test for previous bugfix --- src/mailman/rest/tests/test_domains.py | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src') diff --git a/src/mailman/rest/tests/test_domains.py b/src/mailman/rest/tests/test_domains.py index 716ded580..e291d1e59 100644 --- a/src/mailman/rest/tests/test_domains.py +++ b/src/mailman/rest/tests/test_domains.py @@ -54,6 +54,14 @@ class TestDomains(unittest.TestCase): 'http://localhost:9001/3.0/domains', data, method="POST") self.assertEqual(response.status, 201) + def test_domain_create_with_single_owner(self): + # Creating domain with single owner should not raise InvalidEmailError + content, response = call_api('http://localhost:9001/3.0/domains', + dict(mail_host='example.in', + owner='someperson@example.com'), + method='POST') + self.assertEqual(response.status, 201) + def test_bogus_endpoint_extension(self): # /domains//lists/ is not a valid endpoint. with self.assertRaises(HTTPError) as cm: @@ -102,6 +110,7 @@ class TestDomains(unittest.TestCase): self.assertEqual(cm.exception.code, 404) + class TestDomainOwners(unittest.TestCase): layer = RESTLayer -- cgit v1.2.3-70-g09d2