summaryrefslogtreecommitdiff
path: root/src/mailman/rest
diff options
context:
space:
mode:
Diffstat (limited to 'src/mailman/rest')
-rw-r--r--src/mailman/rest/domains.py4
-rw-r--r--src/mailman/rest/tests/test_domains.py5
2 files changed, 7 insertions, 2 deletions
diff --git a/src/mailman/rest/domains.py b/src/mailman/rest/domains.py
index d312737df..2f41ecfd9 100644
--- a/src/mailman/rest/domains.py
+++ b/src/mailman/rest/domains.py
@@ -110,9 +110,9 @@ class AllDomains(_DomainBase):
validator = Validator(mail_host=str,
description=str,
base_url=str,
- owner_id=int,
+ owner=int,
_optional=('description', 'base_url',
- 'owner_id'))
+ 'owner'))
domain = domain_manager.add(**validator(request))
except BadDomainSpecificationError as error:
bad_request(response, str(error))
diff --git a/src/mailman/rest/tests/test_domains.py b/src/mailman/rest/tests/test_domains.py
index bf53c8e70..9ebc0c0d8 100644
--- a/src/mailman/rest/tests/test_domains.py
+++ b/src/mailman/rest/tests/test_domains.py
@@ -41,6 +41,11 @@ class TestDomains(unittest.TestCase):
with transaction():
self._mlist = create_list('test@example.com')
+ def test_create_domain(self):
+ """Create domain via REST"""
+ # TODO: Complete this
+ # Tests should be failing with improper REST API.
+
def test_bogus_endpoint_extension(self):
# /domains/<domain>/lists/<anything> is not a valid endpoint.
with self.assertRaises(HTTPError) as cm: