summaryrefslogtreecommitdiff
path: root/src/mailman/rest/tests/test_users.py
diff options
context:
space:
mode:
authorBarry Warsaw2014-04-15 17:54:35 -0400
committerBarry Warsaw2014-04-15 17:54:35 -0400
commit13823e4d2b9bea190dd207a02a8107bc43ee49fe (patch)
tree0917bab22a2d9d422567c80d2c27a4e601103ea2 /src/mailman/rest/tests/test_users.py
parent29d6d587389c32eb84d7faa51e3072e02e385c2d (diff)
downloadmailman-13823e4d2b9bea190dd207a02a8107bc43ee49fe.tar.gz
mailman-13823e4d2b9bea190dd207a02a8107bc43ee49fe.tar.zst
mailman-13823e4d2b9bea190dd207a02a8107bc43ee49fe.zip
* Fixed a crash in the REST server when searching for nonmembers via
``/find`` which we've never seen before, because those members only have an address record, not a user record. This requires a small change in the API where the JSON response's ``address`` key now contains the URL to the address resource, the new ``email`` key contains the email address as a string, and the ``user`` key is optional.
Diffstat (limited to '')
-rw-r--r--src/mailman/rest/tests/test_users.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/mailman/rest/tests/test_users.py b/src/mailman/rest/tests/test_users.py
index 80bf9526d..10cc724a3 100644
--- a/src/mailman/rest/tests/test_users.py
+++ b/src/mailman/rest/tests/test_users.py
@@ -229,7 +229,10 @@ class TestLP1074374(unittest.TestCase):
content, response = call_api('http://localhost:9001/3.0/members')
self.assertEqual(content['total_size'], 1)
member = content['entries'][0]
- self.assertEqual(member['address'], 'anne@example.com')
+ self.assertEqual(
+ member['address'],
+ 'http://localhost:9001/3.0/addresses/anne@example.com')
+ self.assertEqual(member['email'], 'anne@example.com')
self.assertEqual(member['delivery_mode'], 'regular')
self.assertEqual(member['list_id'], 'test.example.com')
self.assertEqual(member['role'], 'member')