diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 1a8d21c..e2eb17f 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,13 +1,17 @@
image: maxking/mailman-ci-runner
-django18:
+django-1.8:
script:
- tox -e py27-django18
-django19:
+django-1.9:
script:
- tox -e py27-django19
+django-1.10:
+ script:
+ - tox -e py27-django110
+
pep8:
script:
- tox -e pep8
diff --git a/src/postorius/tests/fixtures/vcr_cassettes/AddModeratorTest.test_new_moderator_added.yaml b/src/postorius/tests/fixtures/vcr_cassettes/AddModeratorTest.test_new_moderator_added.yaml
index e8b38be..6abaee0 100644
--- a/src/postorius/tests/fixtures/vcr_cassettes/AddModeratorTest.test_new_moderator_added.yaml
+++ b/src/postorius/tests/fixtures/vcr_cassettes/AddModeratorTest.test_new_moderator_added.yaml
@@ -10,6 +10,7 @@
body: {string: !!python/unicode ''}
headers:
content-length: ['0']
+ content-type: [application/json; charset=UTF-8]
location: ['http://localhost:9001/3.0/domains/example.com']
status: {code: 201, message: Created}
- request:
@@ -25,7 +26,7 @@
"url_host": "example.com"}'}
headers:
content-length: ['233']
- content-type: [application/json; charset=utf-8]
+ content-type: [application/json; charset=UTF-8]
status: {code: 200, message: OK}
- request:
body: fqdn_listname=foo%40example.com
@@ -38,6 +39,7 @@
body: {string: !!python/unicode ''}
headers:
content-length: ['0']
+ content-type: [application/json; charset=UTF-8]
location: ['http://localhost:9001/3.0/lists/foo.example.com']
status: {code: 201, message: Created}
- request:
@@ -50,7 +52,7 @@
body: {string: !!python/unicode 404 Not Found}
headers:
content-length: ['13']
- content-type: [application/json; charset=utf-8]
+ content-type: [application/json; charset=UTF-8]
status: {code: 404, message: Not Found}
- request:
body: null
@@ -65,7 +67,7 @@
"http://localhost:9001/3.0/lists/foo.example.com", "volume": 1}'}
headers:
content-length: ['294']
- content-type: [application/json; charset=utf-8]
+ content-type: [application/json; charset=UTF-8]
status: {code: 200, message: OK}
- request:
body: list_id=foo.example.com&role=moderator&subscriber=newmod%40example.com
@@ -78,6 +80,7 @@
body: {string: !!python/unicode ''}
headers:
content-length: ['0']
+ content-type: [application/json; charset=UTF-8]
location: ['http://localhost:9001/3.0/members/1']
status: {code: 201, message: Created}
- request:
@@ -90,7 +93,7 @@
body: {string: !!python/unicode 404 Not Found}
headers:
content-length: ['13']
- content-type: [application/json; charset=utf-8]
+ content-type: [application/json; charset=UTF-8]
status: {code: 404, message: Not Found}
- request:
body: null
@@ -105,7 +108,7 @@
"http://localhost:9001/3.0/lists/foo.example.com", "volume": 1}'}
headers:
content-length: ['294']
- content-type: [application/json; charset=utf-8]
+ content-type: [application/json; charset=UTF-8]
status: {code: 200, message: OK}
- request:
body: null
@@ -115,14 +118,14 @@
uri: http://localhost:9001/3.0/lists/foo.example.com/roster/moderator
response:
body: {string: !!python/unicode '{"entries": [{"address": "http://localhost:9001/3.0/addresses/newmod@example.com",
- "delivery_mode": "regular", "email": "newmod@example.com", "http_etag": "\"01e572d45c10662ebe7b27e094be53fa36bb23e1\"",
+ "delivery_mode": "regular", "email": "newmod@example.com", "http_etag": "\"c8c71cc3e29d53d13e916dcb627e952627f1ca18\"",
"list_id": "foo.example.com", "member_id": 1, "moderation_action": "accept",
"role": "moderator", "self_link": "http://localhost:9001/3.0/members/1", "user":
- "http://localhost:9001/3.0/users/6"}], "http_etag": "\"91ceb5b27a2b0e697c1d38abbb875ea220e99082\"",
+ "http://localhost:9001/3.0/users/1"}], "http_etag": "\"34e4cec6c6315ead2e60d99bf4c13485e3a09be9\"",
"start": 0, "total_size": 1}'}
headers:
content-length: ['489']
- content-type: [application/json; charset=utf-8]
+ content-type: [application/json; charset=UTF-8]
status: {code: 200, message: OK}
- request:
body: null
@@ -132,36 +135,21 @@
uri: http://localhost:9001/3.0/lists/foo.example.com/roster/moderator
response:
body: {string: !!python/unicode '{"entries": [{"address": "http://localhost:9001/3.0/addresses/newmod@example.com",
- "delivery_mode": "regular", "email": "newmod@example.com", "http_etag": "\"01e572d45c10662ebe7b27e094be53fa36bb23e1\"",
+ "delivery_mode": "regular", "email": "newmod@example.com", "http_etag": "\"c8c71cc3e29d53d13e916dcb627e952627f1ca18\"",
"list_id": "foo.example.com", "member_id": 1, "moderation_action": "accept",
"role": "moderator", "self_link": "http://localhost:9001/3.0/members/1", "user":
- "http://localhost:9001/3.0/users/6"}], "http_etag": "\"91ceb5b27a2b0e697c1d38abbb875ea220e99082\"",
+ "http://localhost:9001/3.0/users/1"}], "http_etag": "\"34e4cec6c6315ead2e60d99bf4c13485e3a09be9\"",
"start": 0, "total_size": 1}'}
headers:
content-length: ['489']
- content-type: [application/json; charset=utf-8]
- status: {code: 200, message: OK}
-- request:
- body: null
- headers:
- accept-encoding: ['gzip, deflate']
- method: !!python/unicode GET
- uri: http://localhost:9001/3.0/lists/foo.example.com
- response:
- body: {string: !!python/unicode '{"display_name": "Foo", "fqdn_listname": "foo@example.com",
- "http_etag": "\"698a819bbb6b902096a8c5543cc7fac2328960d5\"", "list_id": "foo.example.com",
- "list_name": "foo", "mail_host": "example.com", "member_count": 0, "self_link":
- "http://localhost:9001/3.0/lists/foo.example.com", "volume": 1}'}
- headers:
- content-length: ['294']
- content-type: [application/json; charset=utf-8]
+ content-type: [application/json; charset=UTF-8]
status: {code: 200, message: OK}
- request:
body: null
headers:
accept-encoding: ['gzip, deflate']
method: !!python/unicode DELETE
- uri: http://localhost:9001/3.0/lists/foo@example.com
+ uri: http://localhost:9001/3.0/lists/foo.example.com
response:
body: {string: !!python/unicode ''}
headers:
diff --git a/src/postorius/tests/fixtures/vcr_cassettes/AddRemoveOwnerTest.test_add_remove_owner.yaml b/src/postorius/tests/fixtures/vcr_cassettes/AddRemoveOwnerTest.test_add_remove_owner.yaml
index dd45d51..26bdc3e 100644
--- a/src/postorius/tests/fixtures/vcr_cassettes/AddRemoveOwnerTest.test_add_remove_owner.yaml
+++ b/src/postorius/tests/fixtures/vcr_cassettes/AddRemoveOwnerTest.test_add_remove_owner.yaml
@@ -10,6 +10,7 @@
body: {string: !!python/unicode ''}
headers:
content-length: ['0']
+ content-type: [application/json; charset=UTF-8]
location: ['http://localhost:9001/3.0/domains/example.com']
status: {code: 201, message: Created}
- request:
@@ -25,7 +26,7 @@
"url_host": "example.com"}'}
headers:
content-length: ['233']
- content-type: [application/json; charset=utf-8]
+ content-type: [application/json; charset=UTF-8]
status: {code: 200, message: OK}
- request:
body: fqdn_listname=foo%40example.com
@@ -38,6 +39,7 @@
body: {string: !!python/unicode ''}
headers:
content-length: ['0']
+ content-type: [application/json; charset=UTF-8]
location: ['http://localhost:9001/3.0/lists/foo.example.com']
status: {code: 201, message: Created}
- request:
@@ -53,7 +55,7 @@
"http://localhost:9001/3.0/lists/foo.example.com", "volume": 1}'}
headers:
content-length: ['294']
- content-type: [application/json; charset=utf-8]
+ content-type: [application/json; charset=UTF-8]
status: {code: 200, message: OK}
- request:
body: list_id=foo.example.com&role=owner&subscriber=su%40example.com
@@ -66,6 +68,7 @@
body: {string: !!python/unicode ''}
headers:
content-length: ['0']
+ content-type: [application/json; charset=UTF-8]
location: ['http://localhost:9001/3.0/members/2']
status: {code: 201, message: Created}
- request:
@@ -76,27 +79,27 @@
uri: http://localhost:9001/3.0/users/su@example.com
response:
body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag":
- "\"c7360c029a83c97672ca38dd8b008d48e05949a6\"", "is_server_owner": false,
- "self_link": "http://localhost:9001/3.0/users/7", "user_id": 7}'}
+ "\"b36f8ca1d91d583901c768dc116815282d469c66\"", "is_server_owner": false,
+ "self_link": "http://localhost:9001/3.0/users/2", "user_id": 2}'}
headers:
content-length: ['188']
- content-type: [application/json; charset=utf-8]
+ content-type: [application/json; charset=UTF-8]
status: {code: 200, message: OK}
- request:
body: null
headers:
accept-encoding: ['gzip, deflate']
method: !!python/unicode GET
- uri: http://localhost:9001/3.0/users/7/addresses
+ uri: http://localhost:9001/3.0/users/2/addresses
response:
body: {string: !!python/unicode '{"entries": [{"email": "su@example.com", "http_etag":
- "\"4e3a66d2b3908d302befe905a19dcb48a00acd7a\"", "original_email": "su@example.com",
+ "\"a8988d233ad4b9e8641ad5d75553912565efec83\"", "original_email": "su@example.com",
"registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/su@example.com",
- "user": "http://localhost:9001/3.0/users/7"}], "http_etag": "\"ad9848f665afaa839c04e50665383975be62a504\"",
+ "user": "http://localhost:9001/3.0/users/2"}], "http_etag": "\"7cc723891821fbf8b0974c2ec407cca11fbb6726\"",
"start": 0, "total_size": 1}'}
headers:
content-length: ['381']
- content-type: [application/json; charset=utf-8]
+ content-type: [application/json; charset=UTF-8]
status: {code: 200, message: OK}
- request:
body: null
@@ -111,7 +114,7 @@
"http://localhost:9001/3.0/lists/foo.example.com", "volume": 1}'}
headers:
content-length: ['294']
- content-type: [application/json; charset=utf-8]
+ content-type: [application/json; charset=UTF-8]
status: {code: 200, message: OK}
- request:
body: list_id=foo.example.com&role=owner&subscriber=newowner%40example.com
@@ -124,6 +127,7 @@
body: {string: !!python/unicode ''}
headers:
content-length: ['0']
+ content-type: [application/json; charset=UTF-8]
location: ['http://localhost:9001/3.0/members/3']
status: {code: 201, message: Created}
- request:
@@ -134,27 +138,27 @@
uri: http://localhost:9001/3.0/users/su@example.com
response:
body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag":
- "\"c7360c029a83c97672ca38dd8b008d48e05949a6\"", "is_server_owner": false,
- "self_link": "http://localhost:9001/3.0/users/7", "user_id": 7}'}
+ "\"b36f8ca1d91d583901c768dc116815282d469c66\"", "is_server_owner": false,
+ "self_link": "http://localhost:9001/3.0/users/2", "user_id": 2}'}
headers:
content-length: ['188']
- content-type: [application/json; charset=utf-8]
+ content-type: [application/json; charset=UTF-8]
status: {code: 200, message: OK}
- request:
body: null
headers:
accept-encoding: ['gzip, deflate']
method: !!python/unicode GET
- uri: http://localhost:9001/3.0/users/7/addresses
+ uri: http://localhost:9001/3.0/users/2/addresses
response:
body: {string: !!python/unicode '{"entries": [{"email": "su@example.com", "http_etag":
- "\"4e3a66d2b3908d302befe905a19dcb48a00acd7a\"", "original_email": "su@example.com",
+ "\"a8988d233ad4b9e8641ad5d75553912565efec83\"", "original_email": "su@example.com",
"registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/su@example.com",
- "user": "http://localhost:9001/3.0/users/7"}], "http_etag": "\"ad9848f665afaa839c04e50665383975be62a504\"",
+ "user": "http://localhost:9001/3.0/users/2"}], "http_etag": "\"7cc723891821fbf8b0974c2ec407cca11fbb6726\"",
"start": 0, "total_size": 1}'}
headers:
content-length: ['381']
- content-type: [application/json; charset=utf-8]
+ content-type: [application/json; charset=UTF-8]
status: {code: 200, message: OK}
- request:
body: null
@@ -169,7 +173,7 @@
"http://localhost:9001/3.0/lists/foo.example.com", "volume": 1}'}
headers:
content-length: ['294']
- content-type: [application/json; charset=utf-8]
+ content-type: [application/json; charset=UTF-8]
status: {code: 200, message: OK}
- request:
body: null
@@ -180,18 +184,18 @@
response:
body: {string: !!python/unicode '{"entries": [{"address": "http://localhost:9001/3.0/addresses/newowner@example.com",
"delivery_mode": "regular", "email": "newowner@example.com", "http_etag":
- "\"b0ab9ea4351ce9097f0a6528ff6e705061d5d3b4\"", "list_id": "foo.example.com",
+ "\"c360c4bc48bbbcee07c1671e1017747feba62e4c\"", "list_id": "foo.example.com",
"member_id": 3, "moderation_action": "accept", "role": "owner", "self_link":
- "http://localhost:9001/3.0/members/3", "user": "http://localhost:9001/3.0/users/8"},
+ "http://localhost:9001/3.0/members/3", "user": "http://localhost:9001/3.0/users/3"},
{"address": "http://localhost:9001/3.0/addresses/su@example.com", "delivery_mode":
- "regular", "email": "su@example.com", "http_etag": "\"ea8a337f32d6d26e3a501fe28f6e419f7407ea4e\"",
+ "regular", "email": "su@example.com", "http_etag": "\"6d988707f754565f2549feb10fb8d43ba08b7fc0\"",
"list_id": "foo.example.com", "member_id": 2, "moderation_action": "accept",
"role": "owner", "self_link": "http://localhost:9001/3.0/members/2", "user":
- "http://localhost:9001/3.0/users/7"}], "http_etag": "\"1e3d423ef5a404e1d1f86df7c67a216adba691a8\"",
+ "http://localhost:9001/3.0/users/2"}], "http_etag": "\"a22da6e895b3ece1bba80b58412640036aa3b856\"",
"start": 0, "total_size": 2}'}
headers:
content-length: ['863']
- content-type: [application/json; charset=utf-8]
+ content-type: [application/json; charset=UTF-8]
status: {code: 200, message: OK}
- request:
body: null
@@ -202,18 +206,18 @@
response:
body: {string: !!python/unicode '{"entries": [{"address": "http://localhost:9001/3.0/addresses/newowner@example.com",
"delivery_mode": "regular", "email": "newowner@example.com", "http_etag":
- "\"b0ab9ea4351ce9097f0a6528ff6e705061d5d3b4\"", "list_id": "foo.example.com",
+ "\"c360c4bc48bbbcee07c1671e1017747feba62e4c\"", "list_id": "foo.example.com",
"member_id": 3, "moderation_action": "accept", "role": "owner", "self_link":
- "http://localhost:9001/3.0/members/3", "user": "http://localhost:9001/3.0/users/8"},
+ "http://localhost:9001/3.0/members/3", "user": "http://localhost:9001/3.0/users/3"},
{"address": "http://localhost:9001/3.0/addresses/su@example.com", "delivery_mode":
- "regular", "email": "su@example.com", "http_etag": "\"ea8a337f32d6d26e3a501fe28f6e419f7407ea4e\"",
+ "regular", "email": "su@example.com", "http_etag": "\"6d988707f754565f2549feb10fb8d43ba08b7fc0\"",
"list_id": "foo.example.com", "member_id": 2, "moderation_action": "accept",
"role": "owner", "self_link": "http://localhost:9001/3.0/members/2", "user":
- "http://localhost:9001/3.0/users/7"}], "http_etag": "\"1e3d423ef5a404e1d1f86df7c67a216adba691a8\"",
+ "http://localhost:9001/3.0/users/2"}], "http_etag": "\"a22da6e895b3ece1bba80b58412640036aa3b856\"",
"start": 0, "total_size": 2}'}
headers:
content-length: ['863']
- content-type: [application/json; charset=utf-8]
+ content-type: [application/json; charset=UTF-8]
status: {code: 200, message: OK}
- request:
body: null
@@ -223,27 +227,27 @@
uri: http://localhost:9001/3.0/users/su@example.com
response:
body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag":
- "\"c7360c029a83c97672ca38dd8b008d48e05949a6\"", "is_server_owner": false,
- "self_link": "http://localhost:9001/3.0/users/7", "user_id": 7}'}
+ "\"b36f8ca1d91d583901c768dc116815282d469c66\"", "is_server_owner": false,
+ "self_link": "http://localhost:9001/3.0/users/2", "user_id": 2}'}
headers:
content-length: ['188']
- content-type: [application/json; charset=utf-8]
+ content-type: [application/json; charset=UTF-8]
status: {code: 200, message: OK}
- request:
body: null
headers:
accept-encoding: ['gzip, deflate']
method: !!python/unicode GET
- uri: http://localhost:9001/3.0/users/7/addresses
+ uri: http://localhost:9001/3.0/users/2/addresses
response:
body: {string: !!python/unicode '{"entries": [{"email": "su@example.com", "http_etag":
- "\"4e3a66d2b3908d302befe905a19dcb48a00acd7a\"", "original_email": "su@example.com",
+ "\"a8988d233ad4b9e8641ad5d75553912565efec83\"", "original_email": "su@example.com",
"registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/su@example.com",
- "user": "http://localhost:9001/3.0/users/7"}], "http_etag": "\"ad9848f665afaa839c04e50665383975be62a504\"",
+ "user": "http://localhost:9001/3.0/users/2"}], "http_etag": "\"7cc723891821fbf8b0974c2ec407cca11fbb6726\"",
"start": 0, "total_size": 1}'}
headers:
content-length: ['381']
- content-type: [application/json; charset=utf-8]
+ content-type: [application/json; charset=UTF-8]
status: {code: 200, message: OK}
- request:
body: null
@@ -258,7 +262,7 @@
"http://localhost:9001/3.0/lists/foo.example.com", "volume": 1}'}
headers:
content-length: ['294']
- content-type: [application/json; charset=utf-8]
+ content-type: [application/json; charset=UTF-8]
status: {code: 200, message: OK}
- request:
body: null
@@ -269,18 +273,18 @@
response:
body: {string: !!python/unicode '{"entries": [{"address": "http://localhost:9001/3.0/addresses/newowner@example.com",
"delivery_mode": "regular", "email": "newowner@example.com", "http_etag":
- "\"b0ab9ea4351ce9097f0a6528ff6e705061d5d3b4\"", "list_id": "foo.example.com",
+ "\"c360c4bc48bbbcee07c1671e1017747feba62e4c\"", "list_id": "foo.example.com",
"member_id": 3, "moderation_action": "accept", "role": "owner", "self_link":
- "http://localhost:9001/3.0/members/3", "user": "http://localhost:9001/3.0/users/8"},
+ "http://localhost:9001/3.0/members/3", "user": "http://localhost:9001/3.0/users/3"},
{"address": "http://localhost:9001/3.0/addresses/su@example.com", "delivery_mode":
- "regular", "email": "su@example.com", "http_etag": "\"ea8a337f32d6d26e3a501fe28f6e419f7407ea4e\"",
+ "regular", "email": "su@example.com", "http_etag": "\"6d988707f754565f2549feb10fb8d43ba08b7fc0\"",
"list_id": "foo.example.com", "member_id": 2, "moderation_action": "accept",
"role": "owner", "self_link": "http://localhost:9001/3.0/members/2", "user":
- "http://localhost:9001/3.0/users/7"}], "http_etag": "\"1e3d423ef5a404e1d1f86df7c67a216adba691a8\"",
+ "http://localhost:9001/3.0/users/2"}], "http_etag": "\"a22da6e895b3ece1bba80b58412640036aa3b856\"",
"start": 0, "total_size": 2}'}
headers:
content-length: ['863']
- content-type: [application/json; charset=utf-8]
+ content-type: [application/json; charset=UTF-8]
status: {code: 200, message: OK}
- request:
body: null
@@ -301,36 +305,21 @@
uri: http://localhost:9001/3.0/lists/foo.example.com/roster/owner
response:
body: {string: !!python/unicode '{"entries": [{"address": "http://localhost:9001/3.0/addresses/su@example.com",
- "delivery_mode": "regular", "email": "su@example.com", "http_etag": "\"ea8a337f32d6d26e3a501fe28f6e419f7407ea4e\"",
+ "delivery_mode": "regular", "email": "su@example.com", "http_etag": "\"6d988707f754565f2549feb10fb8d43ba08b7fc0\"",
"list_id": "foo.example.com", "member_id": 2, "moderation_action": "accept",
"role": "owner", "self_link": "http://localhost:9001/3.0/members/2", "user":
- "http://localhost:9001/3.0/users/7"}], "http_etag": "\"3c3dd4982baeac28aae65e24aae7d629a8b373ef\"",
+ "http://localhost:9001/3.0/users/2"}], "http_etag": "\"d2cbb6fb6355e9524edc8e386f081c430375c54c\"",
"start": 0, "total_size": 1}'}
headers:
content-length: ['477']
- content-type: [application/json; charset=utf-8]
- status: {code: 200, message: OK}
-- request:
- body: null
- headers:
- accept-encoding: ['gzip, deflate']
- method: !!python/unicode GET
- uri: http://localhost:9001/3.0/lists/foo.example.com
- response:
- body: {string: !!python/unicode '{"display_name": "Foo", "fqdn_listname": "foo@example.com",
- "http_etag": "\"698a819bbb6b902096a8c5543cc7fac2328960d5\"", "list_id": "foo.example.com",
- "list_name": "foo", "mail_host": "example.com", "member_count": 0, "self_link":
- "http://localhost:9001/3.0/lists/foo.example.com", "volume": 1}'}
- headers:
- content-length: ['294']
- content-type: [application/json; charset=utf-8]
+ content-type: [application/json; charset=UTF-8]
status: {code: 200, message: OK}
- request:
body: null
headers:
accept-encoding: ['gzip, deflate']
method: !!python/unicode DELETE
- uri: http://localhost:9001/3.0/lists/foo@example.com
+ uri: http://localhost:9001/3.0/lists/foo.example.com
response:
body: {string: !!python/unicode ''}
headers:
diff --git a/src/postorius/tests/fixtures/vcr_cassettes/AddRemoveOwnerTest.test_remove_owner_as_owner_self_last.yaml b/src/postorius/tests/fixtures/vcr_cassettes/AddRemoveOwnerTest.test_remove_owner_as_owner_self_last.yaml
index 1404c48..750d454 100644
--- a/src/postorius/tests/fixtures/vcr_cassettes/AddRemoveOwnerTest.test_remove_owner_as_owner_self_last.yaml
+++ b/src/postorius/tests/fixtures/vcr_cassettes/AddRemoveOwnerTest.test_remove_owner_as_owner_self_last.yaml
@@ -10,6 +10,7 @@
body: {string: !!python/unicode ''}
headers:
content-length: ['0']
+ content-type: [application/json; charset=UTF-8]
location: ['http://localhost:9001/3.0/domains/example.com']
status: {code: 201, message: Created}
- request:
@@ -25,7 +26,7 @@
"url_host": "example.com"}'}
headers:
content-length: ['233']
- content-type: [application/json; charset=utf-8]
+ content-type: [application/json; charset=UTF-8]
status: {code: 200, message: OK}
- request:
body: fqdn_listname=foo%40example.com
@@ -38,6 +39,7 @@
body: {string: !!python/unicode ''}
headers:
content-length: ['0']
+ content-type: [application/json; charset=UTF-8]
location: ['http://localhost:9001/3.0/lists/foo.example.com']
status: {code: 201, message: Created}
- request:
@@ -53,7 +55,7 @@
"http://localhost:9001/3.0/lists/foo.example.com", "volume": 1}'}
headers:
content-length: ['294']
- content-type: [application/json; charset=utf-8]
+ content-type: [application/json; charset=UTF-8]
status: {code: 200, message: OK}
- request:
body: list_id=foo.example.com&role=owner&subscriber=su%40example.com
@@ -66,6 +68,7 @@
body: {string: !!python/unicode ''}
headers:
content-length: ['0']
+ content-type: [application/json; charset=UTF-8]
location: ['http://localhost:9001/3.0/members/4']
status: {code: 201, message: Created}
- request:
@@ -81,7 +84,7 @@
"http://localhost:9001/3.0/lists/foo.example.com", "volume": 1}'}
headers:
content-length: ['294']
- content-type: [application/json; charset=utf-8]
+ content-type: [application/json; charset=UTF-8]
status: {code: 200, message: OK}
- request:
body: list_id=foo.example.com&role=owner&subscriber=otherowner%40example.com
@@ -94,6 +97,7 @@
body: {string: !!python/unicode ''}
headers:
content-length: ['0']
+ content-type: [application/json; charset=UTF-8]
location: ['http://localhost:9001/3.0/members/5']
status: {code: 201, message: Created}
- request:
@@ -105,18 +109,18 @@
response:
body: {string: !!python/unicode '{"entries": [{"address": "http://localhost:9001/3.0/addresses/otherowner@example.com",
"delivery_mode": "regular", "email": "otherowner@example.com", "http_etag":
- "\"274d6a800f2e7db18babd8c9938e2e822a713807\"", "list_id": "foo.example.com",
+ "\"39455ab3883c5cb41d206acfc6f5f9d34d8977ad\"", "list_id": "foo.example.com",
"member_id": 5, "moderation_action": "accept", "role": "owner", "self_link":
- "http://localhost:9001/3.0/members/5", "user": "http://localhost:9001/3.0/users/9"},
+ "http://localhost:9001/3.0/members/5", "user": "http://localhost:9001/3.0/users/4"},
{"address": "http://localhost:9001/3.0/addresses/su@example.com", "delivery_mode":
- "regular", "email": "su@example.com", "http_etag": "\"702cfcf0956594e29bd8b568adc28583bb41d877\"",
+ "regular", "email": "su@example.com", "http_etag": "\"10c27e9e6dc556f9516987be57ab48241c56912e\"",
"list_id": "foo.example.com", "member_id": 4, "moderation_action": "accept",
"role": "owner", "self_link": "http://localhost:9001/3.0/members/4", "user":
- "http://localhost:9001/3.0/users/7"}], "http_etag": "\"c2200dea20245cedba89785eeebf67931942d08e\"",
+ "http://localhost:9001/3.0/users/2"}], "http_etag": "\"71540af6234005a7ae65241748770c8e6a80357c\"",
"start": 0, "total_size": 2}'}
headers:
content-length: ['867']
- content-type: [application/json; charset=utf-8]
+ content-type: [application/json; charset=UTF-8]
status: {code: 200, message: OK}
- request:
body: null
@@ -127,18 +131,18 @@
response:
body: {string: !!python/unicode '{"entries": [{"address": "http://localhost:9001/3.0/addresses/otherowner@example.com",
"delivery_mode": "regular", "email": "otherowner@example.com", "http_etag":
- "\"274d6a800f2e7db18babd8c9938e2e822a713807\"", "list_id": "foo.example.com",
+ "\"39455ab3883c5cb41d206acfc6f5f9d34d8977ad\"", "list_id": "foo.example.com",
"member_id": 5, "moderation_action": "accept", "role": "owner", "self_link":
- "http://localhost:9001/3.0/members/5", "user": "http://localhost:9001/3.0/users/9"},
+ "http://localhost:9001/3.0/members/5", "user": "http://localhost:9001/3.0/users/4"},
{"address": "http://localhost:9001/3.0/addresses/su@example.com", "delivery_mode":
- "regular", "email": "su@example.com", "http_etag": "\"702cfcf0956594e29bd8b568adc28583bb41d877\"",
+ "regular", "email": "su@example.com", "http_etag": "\"10c27e9e6dc556f9516987be57ab48241c56912e\"",
"list_id": "foo.example.com", "member_id": 4, "moderation_action": "accept",
"role": "owner", "self_link": "http://localhost:9001/3.0/members/4", "user":
- "http://localhost:9001/3.0/users/7"}], "http_etag": "\"c2200dea20245cedba89785eeebf67931942d08e\"",
+ "http://localhost:9001/3.0/users/2"}], "http_etag": "\"71540af6234005a7ae65241748770c8e6a80357c\"",
"start": 0, "total_size": 2}'}
headers:
content-length: ['867']
- content-type: [application/json; charset=utf-8]
+ content-type: [application/json; charset=UTF-8]
status: {code: 200, message: OK}
- request:
body: null
@@ -148,27 +152,27 @@
uri: http://localhost:9001/3.0/users/su@example.com
response:
body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag":
- "\"c7360c029a83c97672ca38dd8b008d48e05949a6\"", "is_server_owner": false,
- "self_link": "http://localhost:9001/3.0/users/7", "user_id": 7}'}
+ "\"b36f8ca1d91d583901c768dc116815282d469c66\"", "is_server_owner": false,
+ "self_link": "http://localhost:9001/3.0/users/2", "user_id": 2}'}
headers:
content-length: ['188']
- content-type: [application/json; charset=utf-8]
+ content-type: [application/json; charset=UTF-8]
status: {code: 200, message: OK}
- request:
body: null
headers:
accept-encoding: ['gzip, deflate']
method: !!python/unicode GET
- uri: http://localhost:9001/3.0/users/7/addresses
+ uri: http://localhost:9001/3.0/users/2/addresses
response:
body: {string: !!python/unicode '{"entries": [{"email": "su@example.com", "http_etag":
- "\"4e3a66d2b3908d302befe905a19dcb48a00acd7a\"", "original_email": "su@example.com",
+ "\"a8988d233ad4b9e8641ad5d75553912565efec83\"", "original_email": "su@example.com",
"registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/su@example.com",
- "user": "http://localhost:9001/3.0/users/7"}], "http_etag": "\"ad9848f665afaa839c04e50665383975be62a504\"",
+ "user": "http://localhost:9001/3.0/users/2"}], "http_etag": "\"7cc723891821fbf8b0974c2ec407cca11fbb6726\"",
"start": 0, "total_size": 1}'}
headers:
content-length: ['381']
- content-type: [application/json; charset=utf-8]
+ content-type: [application/json; charset=UTF-8]
status: {code: 200, message: OK}
- request:
body: null
@@ -183,7 +187,7 @@
"http://localhost:9001/3.0/lists/foo.example.com", "volume": 1}'}
headers:
content-length: ['294']
- content-type: [application/json; charset=utf-8]
+ content-type: [application/json; charset=UTF-8]
status: {code: 200, message: OK}
- request:
body: null
@@ -194,18 +198,18 @@
response:
body: {string: !!python/unicode '{"entries": [{"address": "http://localhost:9001/3.0/addresses/otherowner@example.com",
"delivery_mode": "regular", "email": "otherowner@example.com", "http_etag":
- "\"274d6a800f2e7db18babd8c9938e2e822a713807\"", "list_id": "foo.example.com",
+ "\"39455ab3883c5cb41d206acfc6f5f9d34d8977ad\"", "list_id": "foo.example.com",
"member_id": 5, "moderation_action": "accept", "role": "owner", "self_link":
- "http://localhost:9001/3.0/members/5", "user": "http://localhost:9001/3.0/users/9"},
+ "http://localhost:9001/3.0/members/5", "user": "http://localhost:9001/3.0/users/4"},
{"address": "http://localhost:9001/3.0/addresses/su@example.com", "delivery_mode":
- "regular", "email": "su@example.com", "http_etag": "\"702cfcf0956594e29bd8b568adc28583bb41d877\"",
+ "regular", "email": "su@example.com", "http_etag": "\"10c27e9e6dc556f9516987be57ab48241c56912e\"",
"list_id": "foo.example.com", "member_id": 4, "moderation_action": "accept",
"role": "owner", "self_link": "http://localhost:9001/3.0/members/4", "user":
- "http://localhost:9001/3.0/users/7"}], "http_etag": "\"c2200dea20245cedba89785eeebf67931942d08e\"",
+ "http://localhost:9001/3.0/users/2"}], "http_etag": "\"71540af6234005a7ae65241748770c8e6a80357c\"",
"start": 0, "total_size": 2}'}
headers:
content-length: ['867']
- content-type: [application/json; charset=utf-8]
+ content-type: [application/json; charset=UTF-8]
status: {code: 200, message: OK}
- request:
body: null
@@ -227,14 +231,14 @@
response:
body: {string: !!python/unicode '{"entries": [{"address": "http://localhost:9001/3.0/addresses/otherowner@example.com",
"delivery_mode": "regular", "email": "otherowner@example.com", "http_etag":
- "\"274d6a800f2e7db18babd8c9938e2e822a713807\"", "list_id": "foo.example.com",
+ "\"39455ab3883c5cb41d206acfc6f5f9d34d8977ad\"", "list_id": "foo.example.com",
"member_id": 5, "moderation_action": "accept", "role": "owner", "self_link":
- "http://localhost:9001/3.0/members/5", "user": "http://localhost:9001/3.0/users/9"}],
- "http_etag": "\"e34dd28c197382476e5166f645757c51ac27ae4b\"", "start": 0, "total_size":
+ "http://localhost:9001/3.0/members/5", "user": "http://localhost:9001/3.0/users/4"}],
+ "http_etag": "\"6129b0373898970dfff1cf574ce14c0ee30b84ca\"", "start": 0, "total_size":
1}'}
headers:
content-length: ['493']
- content-type: [application/json; charset=utf-8]
+ content-type: [application/json; charset=UTF-8]
status: {code: 200, message: OK}
- request:
body: list_id=foo.example.com&role=owner&subscriber=su%40example.com
@@ -247,6 +251,7 @@
body: {string: !!python/unicode ''}
headers:
content-length: ['0']
+ content-type: [application/json; charset=UTF-8]
location: ['http://localhost:9001/3.0/members/6']
status: {code: 201, message: Created}
- request:
@@ -268,14 +273,14 @@
uri: http://localhost:9001/3.0/lists/foo.example.com/roster/owner
response:
body: {string: !!python/unicode '{"entries": [{"address": "http://localhost:9001/3.0/addresses/su@example.com",
- "delivery_mode": "regular", "email": "su@example.com", "http_etag": "\"112ae38114517bb72d3f753c79d57f88d5abf8c8\"",
+ "delivery_mode": "regular", "email": "su@example.com", "http_etag": "\"3b037df8d9ab871f6a55ce119b3f3f7e2b1ea69d\"",
"list_id": "foo.example.com", "member_id": 6, "moderation_action": "accept",
"role": "owner", "self_link": "http://localhost:9001/3.0/members/6", "user":
- "http://localhost:9001/3.0/users/7"}], "http_etag": "\"22510d50c9b877043ce757db5598b6bd9fc46c1c\"",
+ "http://localhost:9001/3.0/users/2"}], "http_etag": "\"3b23baf8158b66e778e6cfbf22afb7a26aafcab3\"",
"start": 0, "total_size": 1}'}
headers:
content-length: ['477']
- content-type: [application/json; charset=utf-8]
+ content-type: [application/json; charset=UTF-8]
status: {code: 200, message: OK}
- request:
body: null
@@ -285,14 +290,14 @@
uri: http://localhost:9001/3.0/lists/foo.example.com/roster/owner
response:
body: {string: !!python/unicode '{"entries": [{"address": "http://localhost:9001/3.0/addresses/su@example.com",
- "delivery_mode": "regular", "email": "su@example.com", "http_etag": "\"112ae38114517bb72d3f753c79d57f88d5abf8c8\"",
+ "delivery_mode": "regular", "email": "su@example.com", "http_etag": "\"3b037df8d9ab871f6a55ce119b3f3f7e2b1ea69d\"",
"list_id": "foo.example.com", "member_id": 6, "moderation_action": "accept",
"role": "owner", "self_link": "http://localhost:9001/3.0/members/6", "user":
- "http://localhost:9001/3.0/users/7"}], "http_etag": "\"22510d50c9b877043ce757db5598b6bd9fc46c1c\"",
+ "http://localhost:9001/3.0/users/2"}], "http_etag": "\"3b23baf8158b66e778e6cfbf22afb7a26aafcab3\"",
"start": 0, "total_size": 1}'}
headers:
content-length: ['477']
- content-type: [application/json; charset=utf-8]
+ content-type: [application/json; charset=UTF-8]
status: {code: 200, message: OK}
- request:
body: null
@@ -302,27 +307,27 @@
uri: http://localhost:9001/3.0/users/su@example.com
response:
body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag":
- "\"c7360c029a83c97672ca38dd8b008d48e05949a6\"", "is_server_owner": false,
- "self_link": "http://localhost:9001/3.0/users/7", "user_id": 7}'}
+ "\"b36f8ca1d91d583901c768dc116815282d469c66\"", "is_server_owner": false,
+ "self_link": "http://localhost:9001/3.0/users/2", "user_id": 2}'}
headers:
content-length: ['188']
- content-type: [application/json; charset=utf-8]
+ content-type: [application/json; charset=UTF-8]
status: {code: 200, message: OK}
- request:
body: null
headers:
accept-encoding: ['gzip, deflate']
method: !!python/unicode GET
- uri: http://localhost:9001/3.0/users/7/addresses
+ uri: http://localhost:9001/3.0/users/2/addresses
response:
body: {string: !!python/unicode '{"entries": [{"email": "su@example.com", "http_etag":
- "\"4e3a66d2b3908d302befe905a19dcb48a00acd7a\"", "original_email": "su@example.com",
+ "\"a8988d233ad4b9e8641ad5d75553912565efec83\"", "original_email": "su@example.com",
"registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/su@example.com",
- "user": "http://localhost:9001/3.0/users/7"}], "http_etag": "\"ad9848f665afaa839c04e50665383975be62a504\"",
+ "user": "http://localhost:9001/3.0/users/2"}], "http_etag": "\"7cc723891821fbf8b0974c2ec407cca11fbb6726\"",
"start": 0, "total_size": 1}'}
headers:
content-length: ['381']
- content-type: [application/json; charset=utf-8]
+ content-type: [application/json; charset=UTF-8]
status: {code: 200, message: OK}
- request:
body: null
@@ -337,7 +342,7 @@
"http://localhost:9001/3.0/lists/foo.example.com", "volume": 1}'}
headers:
content-length: ['294']
- content-type: [application/json; charset=utf-8]
+ content-type: [application/json; charset=UTF-8]
status: {code: 200, message: OK}
- request:
body: null
@@ -347,14 +352,14 @@
uri: http://localhost:9001/3.0/lists/foo.example.com/roster/owner
response:
body: {string: !!python/unicode '{"entries": [{"address": "http://localhost:9001/3.0/addresses/su@example.com",
- "delivery_mode": "regular", "email": "su@example.com", "http_etag": "\"112ae38114517bb72d3f753c79d57f88d5abf8c8\"",
+ "delivery_mode": "regular", "email": "su@example.com", "http_etag": "\"3b037df8d9ab871f6a55ce119b3f3f7e2b1ea69d\"",
"list_id": "foo.example.com", "member_id": 6, "moderation_action": "accept",
"role": "owner", "self_link": "http://localhost:9001/3.0/members/6", "user":
- "http://localhost:9001/3.0/users/7"}], "http_etag": "\"22510d50c9b877043ce757db5598b6bd9fc46c1c\"",
+ "http://localhost:9001/3.0/users/2"}], "http_etag": "\"3b23baf8158b66e778e6cfbf22afb7a26aafcab3\"",
"start": 0, "total_size": 1}'}
headers:
content-length: ['477']
- content-type: [application/json; charset=utf-8]
+ content-type: [application/json; charset=UTF-8]
status: {code: 200, message: OK}
- request:
body: null
@@ -364,36 +369,21 @@
uri: http://localhost:9001/3.0/lists/foo.example.com/roster/owner
response:
body: {string: !!python/unicode '{"entries": [{"address": "http://localhost:9001/3.0/addresses/su@example.com",
- "delivery_mode": "regular", "email": "su@example.com", "http_etag": "\"112ae38114517bb72d3f753c79d57f88d5abf8c8\"",
+ "delivery_mode": "regular", "email": "su@example.com", "http_etag": "\"3b037df8d9ab871f6a55ce119b3f3f7e2b1ea69d\"",
"list_id": "foo.example.com", "member_id": 6, "moderation_action": "accept",
"role": "owner", "self_link": "http://localhost:9001/3.0/members/6", "user":
- "http://localhost:9001/3.0/users/7"}], "http_etag": "\"22510d50c9b877043ce757db5598b6bd9fc46c1c\"",
+ "http://localhost:9001/3.0/users/2"}], "http_etag": "\"3b23baf8158b66e778e6cfbf22afb7a26aafcab3\"",
"start": 0, "total_size": 1}'}
headers:
content-length: ['477']
- content-type: [application/json; charset=utf-8]
- status: {code: 200, message: OK}
-- request:
- body: null
- headers:
- accept-encoding: ['gzip, deflate']
- method: !!python/unicode GET
- uri: http://localhost:9001/3.0/lists/foo.example.com
- response:
- body: {string: !!python/unicode '{"display_name": "Foo", "fqdn_listname": "foo@example.com",
- "http_etag": "\"698a819bbb6b902096a8c5543cc7fac2328960d5\"", "list_id": "foo.example.com",
- "list_name": "foo", "mail_host": "example.com", "member_count": 0, "self_link":
- "http://localhost:9001/3.0/lists/foo.example.com", "volume": 1}'}
- headers:
- content-length: ['294']
- content-type: [application/json; charset=utf-8]
+ content-type: [application/json; charset=UTF-8]
status: {code: 200, message: OK}
- request:
body: null
headers:
accept-encoding: ['gzip, deflate']
method: !!python/unicode DELETE
- uri: http://localhost:9001/3.0/lists/foo@example.com
+ uri: http://localhost:9001/3.0/lists/foo.example.com
response:
body: {string: !!python/unicode ''}
headers:
diff --git a/src/postorius/tests/fixtures/vcr_cassettes/AddRemoveOwnerTest.test_remove_owner_by_owner.yaml b/src/postorius/tests/fixtures/vcr_cassettes/AddRemoveOwnerTest.test_remove_owner_by_owner.yaml
index 8c9b14c..cfab934 100644
--- a/src/postorius/tests/fixtures/vcr_cassettes/AddRemoveOwnerTest.test_remove_owner_by_owner.yaml
+++ b/src/postorius/tests/fixtures/vcr_cassettes/AddRemoveOwnerTest.test_remove_owner_by_owner.yaml
@@ -10,6 +10,7 @@
body: {string: !!python/unicode ''}
headers:
content-length: ['0']
+ content-type: [application/json; charset=UTF-8]
location: ['http://localhost:9001/3.0/domains/example.com']
status: {code: 201, message: Created}
- request:
@@ -25,7 +26,7 @@
"url_host": "example.com"}'}
headers:
content-length: ['233']
- content-type: [application/json; charset=utf-8]
+ content-type: [application/json; charset=UTF-8]
status: {code: 200, message: OK}
- request:
body: fqdn_listname=foo%40example.com
@@ -38,6 +39,7 @@
body: {string: !!python/unicode ''}
headers:
content-length: ['0']
+ content-type: [application/json; charset=UTF-8]
location: ['http://localhost:9001/3.0/lists/foo.example.com']
status: {code: 201, message: Created}
- request:
@@ -53,7 +55,7 @@
"http://localhost:9001/3.0/lists/foo.example.com", "volume": 1}'}
headers:
content-length: ['294']
- content-type: [application/json; charset=utf-8]
+ content-type: [application/json; charset=UTF-8]
status: {code: 200, message: OK}
- request:
body: list_id=foo.example.com&role=owner&subscriber=su%40example.com
@@ -66,6 +68,7 @@
body: {string: !!python/unicode ''}
headers:
content-length: ['0']
+ content-type: [application/json; charset=UTF-8]
location: ['http://localhost:9001/3.0/members/7']
status: {code: 201, message: Created}
- request:
@@ -76,14 +79,14 @@
uri: http://localhost:9001/3.0/lists/foo.example.com/roster/owner
response:
body: {string: !!python/unicode '{"entries": [{"address": "http://localhost:9001/3.0/addresses/su@example.com",
- "delivery_mode": "regular", "email": "su@example.com", "http_etag": "\"d6564606540aa51e459b721885361f0681b88052\"",
+ "delivery_mode": "regular", "email": "su@example.com", "http_etag": "\"41d57890ce496889a5e5228b4fe371df4c366828\"",
"list_id": "foo.example.com", "member_id": 7, "moderation_action": "accept",
"role": "owner", "self_link": "http://localhost:9001/3.0/members/7", "user":
- "http://localhost:9001/3.0/users/7"}], "http_etag": "\"5dafdb1115e0ceb4d5c5f5745c9973d16703682a\"",
+ "http://localhost:9001/3.0/users/2"}], "http_etag": "\"cad820684c756eb04bc8968d4f91288f13498e66\"",
"start": 0, "total_size": 1}'}
headers:
content-length: ['477']
- content-type: [application/json; charset=utf-8]
+ content-type: [application/json; charset=UTF-8]
status: {code: 200, message: OK}
- request:
body: null
@@ -93,27 +96,27 @@
uri: http://localhost:9001/3.0/users/su@example.com
response:
body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag":
- "\"c7360c029a83c97672ca38dd8b008d48e05949a6\"", "is_server_owner": false,
- "self_link": "http://localhost:9001/3.0/users/7", "user_id": 7}'}
+ "\"b36f8ca1d91d583901c768dc116815282d469c66\"", "is_server_owner": false,
+ "self_link": "http://localhost:9001/3.0/users/2", "user_id": 2}'}
headers:
content-length: ['188']
- content-type: [application/json; charset=utf-8]
+ content-type: [application/json; charset=UTF-8]
status: {code: 200, message: OK}
- request:
body: null
headers:
accept-encoding: ['gzip, deflate']
method: !!python/unicode GET
- uri: http://localhost:9001/3.0/users/7/addresses
+ uri: http://localhost:9001/3.0/users/2/addresses
response:
body: {string: !!python/unicode '{"entries": [{"email": "su@example.com", "http_etag":
- "\"4e3a66d2b3908d302befe905a19dcb48a00acd7a\"", "original_email": "su@example.com",
+ "\"a8988d233ad4b9e8641ad5d75553912565efec83\"", "original_email": "su@example.com",
"registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/su@example.com",
- "user": "http://localhost:9001/3.0/users/7"}], "http_etag": "\"ad9848f665afaa839c04e50665383975be62a504\"",
+ "user": "http://localhost:9001/3.0/users/2"}], "http_etag": "\"7cc723891821fbf8b0974c2ec407cca11fbb6726\"",
"start": 0, "total_size": 1}'}
headers:
content-length: ['381']
- content-type: [application/json; charset=utf-8]
+ content-type: [application/json; charset=UTF-8]
status: {code: 200, message: OK}
- request:
body: null
@@ -128,7 +131,7 @@
"http://localhost:9001/3.0/lists/foo.example.com", "volume": 1}'}
headers:
content-length: ['294']
- content-type: [application/json; charset=utf-8]
+ content-type: [application/json; charset=UTF-8]
status: {code: 200, message: OK}
- request:
body: null
@@ -138,14 +141,14 @@
uri: http://localhost:9001/3.0/lists/foo.example.com/roster/owner
response:
body: {string: !!python/unicode '{"entries": [{"address": "http://localhost:9001/3.0/addresses/su@example.com",
- "delivery_mode": "regular", "email": "su@example.com", "http_etag": "\"d6564606540aa51e459b721885361f0681b88052\"",
+ "delivery_mode": "regular", "email": "su@example.com", "http_etag": "\"41d57890ce496889a5e5228b4fe371df4c366828\"",
"list_id": "foo.example.com", "member_id": 7, "moderation_action": "accept",
"role": "owner", "self_link": "http://localhost:9001/3.0/members/7", "user":
- "http://localhost:9001/3.0/users/7"}], "http_etag": "\"5dafdb1115e0ceb4d5c5f5745c9973d16703682a\"",
+ "http://localhost:9001/3.0/users/2"}], "http_etag": "\"cad820684c756eb04bc8968d4f91288f13498e66\"",
"start": 0, "total_size": 1}'}
headers:
content-length: ['477']
- content-type: [application/json; charset=utf-8]
+ content-type: [application/json; charset=UTF-8]
status: {code: 200, message: OK}
- request:
body: null
@@ -158,7 +161,7 @@
"start": 0, "total_size": 0}'}
headers:
content-length: ['90']
- content-type: [application/json; charset=utf-8]
+ content-type: [application/json; charset=UTF-8]
status: {code: 200, message: OK}
- request:
body: null
@@ -173,7 +176,7 @@
"http://localhost:9001/3.0/lists/foo.example.com", "volume": 1}'}
headers:
content-length: ['294']
- content-type: [application/json; charset=utf-8]
+ content-type: [application/json; charset=UTF-8]
status: {code: 200, message: OK}
- request:
body: list_id=foo.example.com&role=owner&subscriber=newowner%40example.com
@@ -186,6 +189,7 @@
body: {string: !!python/unicode ''}
headers:
content-length: ['0']
+ content-type: [application/json; charset=UTF-8]
location: ['http://localhost:9001/3.0/members/8']
status: {code: 201, message: Created}
- request:
@@ -196,27 +200,27 @@
uri: http://localhost:9001/3.0/users/su@example.com
response:
body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag":
- "\"c7360c029a83c97672ca38dd8b008d48e05949a6\"", "is_server_owner": false,
- "self_link": "http://localhost:9001/3.0/users/7", "user_id": 7}'}
+ "\"b36f8ca1d91d583901c768dc116815282d469c66\"", "is_server_owner": false,
+ "self_link": "http://localhost:9001/3.0/users/2", "user_id": 2}'}
headers:
content-length: ['188']
- content-type: [application/json; charset=utf-8]
+ content-type: [application/json; charset=UTF-8]
status: {code: 200, message: OK}
- request:
body: null
headers:
accept-encoding: ['gzip, deflate']
method: !!python/unicode GET
- uri: http://localhost:9001/3.0/users/7/addresses
+ uri: http://localhost:9001/3.0/users/2/addresses
response:
body: {string: !!python/unicode '{"entries": [{"email": "su@example.com", "http_etag":
- "\"4e3a66d2b3908d302befe905a19dcb48a00acd7a\"", "original_email": "su@example.com",
+ "\"a8988d233ad4b9e8641ad5d75553912565efec83\"", "original_email": "su@example.com",
"registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/su@example.com",
- "user": "http://localhost:9001/3.0/users/7"}], "http_etag": "\"ad9848f665afaa839c04e50665383975be62a504\"",
+ "user": "http://localhost:9001/3.0/users/2"}], "http_etag": "\"7cc723891821fbf8b0974c2ec407cca11fbb6726\"",
"start": 0, "total_size": 1}'}
headers:
content-length: ['381']
- content-type: [application/json; charset=utf-8]
+ content-type: [application/json; charset=UTF-8]
status: {code: 200, message: OK}
- request:
body: null
@@ -231,7 +235,7 @@
"http://localhost:9001/3.0/lists/foo.example.com", "volume": 1}'}
headers:
content-length: ['294']
- content-type: [application/json; charset=utf-8]
+ content-type: [application/json; charset=UTF-8]
status: {code: 200, message: OK}
- request:
body: null
@@ -242,18 +246,18 @@
response:
body: {string: !!python/unicode '{"entries": [{"address": "http://localhost:9001/3.0/addresses/newowner@example.com",
"delivery_mode": "regular", "email": "newowner@example.com", "http_etag":
- "\"11ab48d88f947c27fa31e246de34e7414e74e5ac\"", "list_id": "foo.example.com",
+ "\"cb2189f8ba0ef7b4c13784d0d4bd22d7fc1056bf\"", "list_id": "foo.example.com",
"member_id": 8, "moderation_action": "accept", "role": "owner", "self_link":
- "http://localhost:9001/3.0/members/8", "user": "http://localhost:9001/3.0/users/8"},
+ "http://localhost:9001/3.0/members/8", "user": "http://localhost:9001/3.0/users/3"},
{"address": "http://localhost:9001/3.0/addresses/su@example.com", "delivery_mode":
- "regular", "email": "su@example.com", "http_etag": "\"d6564606540aa51e459b721885361f0681b88052\"",
+ "regular", "email": "su@example.com", "http_etag": "\"41d57890ce496889a5e5228b4fe371df4c366828\"",
"list_id": "foo.example.com", "member_id": 7, "moderation_action": "accept",
"role": "owner", "self_link": "http://localhost:9001/3.0/members/7", "user":
- "http://localhost:9001/3.0/users/7"}], "http_etag": "\"1b0c5224232125cc46903b554d42ba882dac0661\"",
+ "http://localhost:9001/3.0/users/2"}], "http_etag": "\"e6c44c2170ac8bf35b3c83f0bf8fbd3f35549e16\"",
"start": 0, "total_size": 2}'}
headers:
content-length: ['863']
- content-type: [application/json; charset=utf-8]
+ content-type: [application/json; charset=UTF-8]
status: {code: 200, message: OK}
- request:
body: null
@@ -266,7 +270,7 @@
"start": 0, "total_size": 0}'}
headers:
content-length: ['90']
- content-type: [application/json; charset=utf-8]
+ content-type: [application/json; charset=UTF-8]
status: {code: 200, message: OK}
- request:
body: null
@@ -281,7 +285,7 @@
"http://localhost:9001/3.0/lists/foo.example.com", "volume": 1}'}
headers:
content-length: ['294']
- content-type: [application/json; charset=utf-8]
+ content-type: [application/json; charset=UTF-8]
status: {code: 200, message: OK}
- request:
body: null
@@ -292,18 +296,18 @@
response:
body: {string: !!python/unicode '{"entries": [{"address": "http://localhost:9001/3.0/addresses/newowner@example.com",
"delivery_mode": "regular", "email": "newowner@example.com", "http_etag":
- "\"11ab48d88f947c27fa31e246de34e7414e74e5ac\"", "list_id": "foo.example.com",
+ "\"cb2189f8ba0ef7b4c13784d0d4bd22d7fc1056bf\"", "list_id": "foo.example.com",
"member_id": 8, "moderation_action": "accept", "role": "owner", "self_link":
- "http://localhost:9001/3.0/members/8", "user": "http://localhost:9001/3.0/users/8"},
+ "http://localhost:9001/3.0/members/8", "user": "http://localhost:9001/3.0/users/3"},
{"address": "http://localhost:9001/3.0/addresses/su@example.com", "delivery_mode":
- "regular", "email": "su@example.com", "http_etag": "\"d6564606540aa51e459b721885361f0681b88052\"",
+ "regular", "email": "su@example.com", "http_etag": "\"41d57890ce496889a5e5228b4fe371df4c366828\"",
"list_id": "foo.example.com", "member_id": 7, "moderation_action": "accept",
"role": "owner", "self_link": "http://localhost:9001/3.0/members/7", "user":
- "http://localhost:9001/3.0/users/7"}], "http_etag": "\"1b0c5224232125cc46903b554d42ba882dac0661\"",
+ "http://localhost:9001/3.0/users/2"}], "http_etag": "\"e6c44c2170ac8bf35b3c83f0bf8fbd3f35549e16\"",
"start": 0, "total_size": 2}'}
headers:
content-length: ['863']
- content-type: [application/json; charset=utf-8]
+ content-type: [application/json; charset=UTF-8]
status: {code: 200, message: OK}
- request:
body: null
@@ -314,18 +318,18 @@
response:
body: {string: !!python/unicode '{"entries": [{"address": "http://localhost:9001/3.0/addresses/newowner@example.com",
"delivery_mode": "regular", "email": "newowner@example.com", "http_etag":
- "\"11ab48d88f947c27fa31e246de34e7414e74e5ac\"", "list_id": "foo.example.com",
+ "\"cb2189f8ba0ef7b4c13784d0d4bd22d7fc1056bf\"", "list_id": "foo.example.com",
"member_id": 8, "moderation_action": "accept", "role": "owner", "self_link":
- "http://localhost:9001/3.0/members/8", "user": "http://localhost:9001/3.0/users/8"},
+ "http://localhost:9001/3.0/members/8", "user": "http://localhost:9001/3.0/users/3"},
{"address": "http://localhost:9001/3.0/addresses/su@example.com", "delivery_mode":
- "regular", "email": "su@example.com", "http_etag": "\"d6564606540aa51e459b721885361f0681b88052\"",
+ "regular", "email": "su@example.com", "http_etag": "\"41d57890ce496889a5e5228b4fe371df4c366828\"",
"list_id": "foo.example.com", "member_id": 7, "moderation_action": "accept",
"role": "owner", "self_link": "http://localhost:9001/3.0/members/7", "user":
- "http://localhost:9001/3.0/users/7"}], "http_etag": "\"1b0c5224232125cc46903b554d42ba882dac0661\"",
+ "http://localhost:9001/3.0/users/2"}], "http_etag": "\"e6c44c2170ac8bf35b3c83f0bf8fbd3f35549e16\"",
"start": 0, "total_size": 2}'}
headers:
content-length: ['863']
- content-type: [application/json; charset=utf-8]
+ content-type: [application/json; charset=UTF-8]
status: {code: 200, message: OK}
- request:
body: null
@@ -335,27 +339,27 @@
uri: http://localhost:9001/3.0/users/su@example.com
response:
body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag":
- "\"c7360c029a83c97672ca38dd8b008d48e05949a6\"", "is_server_owner": false,
- "self_link": "http://localhost:9001/3.0/users/7", "user_id": 7}'}
+ "\"b36f8ca1d91d583901c768dc116815282d469c66\"", "is_server_owner": false,
+ "self_link": "http://localhost:9001/3.0/users/2", "user_id": 2}'}
headers:
content-length: ['188']
- content-type: [application/json; charset=utf-8]
+ content-type: [application/json; charset=UTF-8]
status: {code: 200, message: OK}
- request:
body: null
headers:
accept-encoding: ['gzip, deflate']
method: !!python/unicode GET
- uri: http://localhost:9001/3.0/users/7/addresses
+ uri: http://localhost:9001/3.0/users/2/addresses
response:
body: {string: !!python/unicode '{"entries": [{"email": "su@example.com", "http_etag":
- "\"4e3a66d2b3908d302befe905a19dcb48a00acd7a\"", "original_email": "su@example.com",
+ "\"a8988d233ad4b9e8641ad5d75553912565efec83\"", "original_email": "su@example.com",
"registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/su@example.com",
- "user": "http://localhost:9001/3.0/users/7"}], "http_etag": "\"ad9848f665afaa839c04e50665383975be62a504\"",
+ "user": "http://localhost:9001/3.0/users/2"}], "http_etag": "\"7cc723891821fbf8b0974c2ec407cca11fbb6726\"",
"start": 0, "total_size": 1}'}
headers:
content-length: ['381']
- content-type: [application/json; charset=utf-8]
+ content-type: [application/json; charset=UTF-8]
status: {code: 200, message: OK}
- request:
body: null
@@ -370,7 +374,7 @@
"http://localhost:9001/3.0/lists/foo.example.com", "volume": 1}'}
headers:
content-length: ['294']
- content-type: [application/json; charset=utf-8]
+ content-type: [application/json; charset=UTF-8]
status: {code: 200, message: OK}
- request:
body: null
@@ -381,18 +385,18 @@
response:
body: {string: !!python/unicode '{"entries": [{"address": "http://localhost:9001/3.0/addresses/newowner@example.com",
"delivery_mode": "regular", "email": "newowner@example.com", "http_etag":
- "\"11ab48d88f947c27fa31e246de34e7414e74e5ac\"", "list_id": "foo.example.com",
+ "\"cb2189f8ba0ef7b4c13784d0d4bd22d7fc1056bf\"", "list_id": "foo.example.com",
"member_id": 8, "moderation_action": "accept", "role": "owner", "self_link":
- "http://localhost:9001/3.0/members/8", "user": "http://localhost:9001/3.0/users/8"},
+ "http://localhost:9001/3.0/members/8", "user": "http://localhost:9001/3.0/users/3"},
{"address": "http://localhost:9001/3.0/addresses/su@example.com", "delivery_mode":
- "regular", "email": "su@example.com", "http_etag": "\"d6564606540aa51e459b721885361f0681b88052\"",
+ "regular", "email": "su@example.com", "http_etag": "\"41d57890ce496889a5e5228b4fe371df4c366828\"",
"list_id": "foo.example.com", "member_id": 7, "moderation_action": "accept",
"role": "owner", "self_link": "http://localhost:9001/3.0/members/7", "user":
- "http://localhost:9001/3.0/users/7"}], "http_etag": "\"1b0c5224232125cc46903b554d42ba882dac0661\"",
+ "http://localhost:9001/3.0/users/2"}], "http_etag": "\"e6c44c2170ac8bf35b3c83f0bf8fbd3f35549e16\"",
"start": 0, "total_size": 2}'}
headers:
content-length: ['863']
- content-type: [application/json; charset=utf-8]
+ content-type: [application/json; charset=UTF-8]
status: {code: 200, message: OK}
- request:
body: null
@@ -405,7 +409,7 @@
"start": 0, "total_size": 0}'}
headers:
content-length: ['90']
- content-type: [application/json; charset=utf-8]
+ content-type: [application/json; charset=UTF-8]
status: {code: 200, message: OK}
- request:
body: null
@@ -420,7 +424,7 @@
"http://localhost:9001/3.0/lists/foo.example.com", "volume": 1}'}
headers:
content-length: ['294']
- content-type: [application/json; charset=utf-8]
+ content-type: [application/json; charset=UTF-8]
status: {code: 200, message: OK}
- request:
body: null
@@ -431,18 +435,18 @@
response:
body: {string: !!python/unicode '{"entries": [{"address": "http://localhost:9001/3.0/addresses/newowner@example.com",
"delivery_mode": "regular", "email": "newowner@example.com", "http_etag":
- "\"11ab48d88f947c27fa31e246de34e7414e74e5ac\"", "list_id": "foo.example.com",
+ "\"cb2189f8ba0ef7b4c13784d0d4bd22d7fc1056bf\"", "list_id": "foo.example.com",
"member_id": 8, "moderation_action": "accept", "role": "owner", "self_link":
- "http://localhost:9001/3.0/members/8", "user": "http://localhost:9001/3.0/users/8"},
+ "http://localhost:9001/3.0/members/8", "user": "http://localhost:9001/3.0/users/3"},
{"address": "http://localhost:9001/3.0/addresses/su@example.com", "delivery_mode":
- "regular", "email": "su@example.com", "http_etag": "\"d6564606540aa51e459b721885361f0681b88052\"",
+ "regular", "email": "su@example.com", "http_etag": "\"41d57890ce496889a5e5228b4fe371df4c366828\"",
"list_id": "foo.example.com", "member_id": 7, "moderation_action": "accept",
"role": "owner", "self_link": "http://localhost:9001/3.0/members/7", "user":
- "http://localhost:9001/3.0/users/7"}], "http_etag": "\"1b0c5224232125cc46903b554d42ba882dac0661\"",
+ "http://localhost:9001/3.0/users/2"}], "http_etag": "\"e6c44c2170ac8bf35b3c83f0bf8fbd3f35549e16\"",
"start": 0, "total_size": 2}'}
headers:
content-length: ['863']
- content-type: [application/json; charset=utf-8]
+ content-type: [application/json; charset=UTF-8]
status: {code: 200, message: OK}
- request:
body: null
@@ -463,36 +467,21 @@
uri: http://localhost:9001/3.0/lists/foo.example.com/roster/owner
response:
body: {string: !!python/unicode '{"entries": [{"address": "http://localhost:9001/3.0/addresses/su@example.com",
- "delivery_mode": "regular", "email": "su@example.com", "http_etag": "\"d6564606540aa51e459b721885361f0681b88052\"",
+ "delivery_mode": "regular", "email": "su@example.com", "http_etag": "\"41d57890ce496889a5e5228b4fe371df4c366828\"",
"list_id": "foo.example.com", "member_id": 7, "moderation_action": "accept",
"role": "owner", "self_link": "http://localhost:9001/3.0/members/7", "user":
- "http://localhost:9001/3.0/users/7"}], "http_etag": "\"5dafdb1115e0ceb4d5c5f5745c9973d16703682a\"",
+ "http://localhost:9001/3.0/users/2"}], "http_etag": "\"cad820684c756eb04bc8968d4f91288f13498e66\"",
"start": 0, "total_size": 1}'}
headers:
content-length: ['477']
- content-type: [application/json; charset=utf-8]
- status: {code: 200, message: OK}
-- request:
- body: null
- headers:
- accept-encoding: ['gzip, deflate']
- method: !!python/unicode GET
- uri: http://localhost:9001/3.0/lists/foo.example.com
- response:
- body: {string: !!python/unicode '{"display_name": "Foo", "fqdn_listname": "foo@example.com",
- "http_etag": "\"698a819bbb6b902096a8c5543cc7fac2328960d5\"", "list_id": "foo.example.com",
- "list_name": "foo", "mail_host": "example.com", "member_count": 0, "self_link":
- "http://localhost:9001/3.0/lists/foo.example.com", "volume": 1}'}
- headers:
- content-length: ['294']
- content-type: [application/json; charset=utf-8]
+ content-type: [application/json; charset=UTF-8]
status: {code: 200, message: OK}
- request:
body: null
headers:
accept-encoding: ['gzip, deflate']
method: !!python/unicode DELETE
- uri: http://localhost:9001/3.0/lists/foo@example.com
+ uri: http://localhost:9001/3.0/lists/foo.example.com
response:
body: {string: !!python/unicode ''}
headers:
diff --git a/src/postorius/tests/fixtures/vcr_cassettes/ListMembersTest.test_search_members_1.yaml b/src/postorius/tests/fixtures/vcr_cassettes/ListMembersTest.test_search_members_1.yaml
index a754d79..71ff078 100644
--- a/src/postorius/tests/fixtures/vcr_cassettes/ListMembersTest.test_search_members_1.yaml
+++ b/src/postorius/tests/fixtures/vcr_cassettes/ListMembersTest.test_search_members_1.yaml
@@ -69,7 +69,7 @@
headers:
content-length: ['0']
content-type: [application/json; charset=UTF-8]
- location: ['http://localhost:9001/3.0/members/11']
+ location: ['http://localhost:9001/3.0/members/9']
status: {code: 201, message: Created}
- request:
body: display_name=None&list_id=foo.example.com&pre_approved=True&pre_confirmed=True&pre_verified=True&subscriber=member-2%40example.com
@@ -83,7 +83,7 @@
headers:
content-length: ['0']
content-type: [application/json; charset=UTF-8]
- location: ['http://localhost:9001/3.0/members/12']
+ location: ['http://localhost:9001/3.0/members/10']
status: {code: 201, message: Created}
- request:
body: null
@@ -92,11 +92,29 @@
method: !!python/unicode GET
uri: http://localhost:9001/3.0/users/su@example.com
response:
- body: {string: !!python/unicode 404 Not Found}
+ body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag":
+ "\"b36f8ca1d91d583901c768dc116815282d469c66\"", "is_server_owner": false,
+ "self_link": "http://localhost:9001/3.0/users/2", "user_id": 2}'}
headers:
- content-length: ['13']
+ content-length: ['188']
content-type: [application/json; charset=UTF-8]
- status: {code: 404, message: Not Found}
+ status: {code: 200, message: OK}
+- request:
+ body: null
+ headers:
+ accept-encoding: ['gzip, deflate']
+ method: !!python/unicode GET
+ uri: http://localhost:9001/3.0/users/2/addresses
+ response:
+ body: {string: !!python/unicode '{"entries": [{"email": "su@example.com", "http_etag":
+ "\"a8988d233ad4b9e8641ad5d75553912565efec83\"", "original_email": "su@example.com",
+ "registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/su@example.com",
+ "user": "http://localhost:9001/3.0/users/2"}], "http_etag": "\"7cc723891821fbf8b0974c2ec407cca11fbb6726\"",
+ "start": 0, "total_size": 1}'}
+ headers:
+ content-length: ['381']
+ content-type: [application/json; charset=UTF-8]
+ status: {code: 200, message: OK}
- request:
body: null
headers:
@@ -121,12 +139,12 @@
response:
body: {string: !!python/unicode '{"entries": [{"address": "http://localhost:9001/3.0/addresses/member-1@example.com",
"delivery_mode": "regular", "email": "member-1@example.com", "http_etag":
- "\"c01d1324b0e2b13b4f39d0f020bd775b7ec36c33\"", "list_id": "foo.example.com",
- "member_id": 11, "role": "member", "self_link": "http://localhost:9001/3.0/members/11",
- "user": "http://localhost:9001/3.0/users/11"}], "http_etag": "\"28b853261e36722aa76fb5388388593f606d5942\"",
+ "\"e0e12330684b2501c7ffba5c3b88356340f9904a\"", "list_id": "foo.example.com",
+ "member_id": 9, "role": "member", "self_link": "http://localhost:9001/3.0/members/9",
+ "user": "http://localhost:9001/3.0/users/5"}], "http_etag": "\"6f2347517cd46134e24b3134db264dfb791cf381\"",
"start": 0, "total_size": 2}'}
headers:
- content-length: ['462']
+ content-length: ['459']
content-type: [application/json; charset=UTF-8]
status: {code: 200, message: OK}
- request:
@@ -138,16 +156,16 @@
response:
body: {string: !!python/unicode '{"entries": [{"address": "http://localhost:9001/3.0/addresses/member-1@example.com",
"delivery_mode": "regular", "email": "member-1@example.com", "http_etag":
- "\"c01d1324b0e2b13b4f39d0f020bd775b7ec36c33\"", "list_id": "foo.example.com",
- "member_id": 11, "role": "member", "self_link": "http://localhost:9001/3.0/members/11",
- "user": "http://localhost:9001/3.0/users/11"}, {"address": "http://localhost:9001/3.0/addresses/member-2@example.com",
+ "\"e0e12330684b2501c7ffba5c3b88356340f9904a\"", "list_id": "foo.example.com",
+ "member_id": 9, "role": "member", "self_link": "http://localhost:9001/3.0/members/9",
+ "user": "http://localhost:9001/3.0/users/5"}, {"address": "http://localhost:9001/3.0/addresses/member-2@example.com",
"delivery_mode": "regular", "email": "member-2@example.com", "http_etag":
- "\"c042a3bf7ddfa6b4b3f6cfc0f94947cac8ec4d69\"", "list_id": "foo.example.com",
- "member_id": 12, "role": "member", "self_link": "http://localhost:9001/3.0/members/12",
- "user": "http://localhost:9001/3.0/users/12"}], "http_etag": "\"3a5e192d8d9eea2893f45b5fe35dc5395520515e\"",
+ "\"233a7991f62ebe214a13301caa0ebba5a0047669\"", "list_id": "foo.example.com",
+ "member_id": 10, "role": "member", "self_link": "http://localhost:9001/3.0/members/10",
+ "user": "http://localhost:9001/3.0/users/6"}], "http_etag": "\"c269df1d423548bd59e1cf3695914101827894c3\"",
"start": 0, "total_size": 2}'}
headers:
- content-length: ['821']
+ content-length: ['817']
content-type: [application/json; charset=UTF-8]
status: {code: 200, message: OK}
- request:
@@ -155,36 +173,15 @@
headers:
accept-encoding: ['gzip, deflate']
method: !!python/unicode GET
- uri: http://localhost:9001/3.0/lists/foo@example.com/roster/member
- response:
- body: {string: !!python/unicode '{"entries": [{"address": "http://localhost:9001/3.0/addresses/member-1@example.com",
- "delivery_mode": "regular", "email": "member-1@example.com", "http_etag":
- "\"c01d1324b0e2b13b4f39d0f020bd775b7ec36c33\"", "list_id": "foo.example.com",
- "member_id": 11, "role": "member", "self_link": "http://localhost:9001/3.0/members/11",
- "user": "http://localhost:9001/3.0/users/11"}, {"address": "http://localhost:9001/3.0/addresses/member-2@example.com",
- "delivery_mode": "regular", "email": "member-2@example.com", "http_etag":
- "\"c042a3bf7ddfa6b4b3f6cfc0f94947cac8ec4d69\"", "list_id": "foo.example.com",
- "member_id": 12, "role": "member", "self_link": "http://localhost:9001/3.0/members/12",
- "user": "http://localhost:9001/3.0/users/12"}], "http_etag": "\"3a5e192d8d9eea2893f45b5fe35dc5395520515e\"",
- "start": 0, "total_size": 2}'}
- headers:
- content-length: ['821']
- content-type: [application/json; charset=UTF-8]
- status: {code: 200, message: OK}
-- request:
- body: null
- headers:
- accept-encoding: ['gzip, deflate']
- method: !!python/unicode GET
- uri: http://localhost:9001/3.0/members/11
+ uri: http://localhost:9001/3.0/members/9
response:
body: {string: !!python/unicode '{"address": "http://localhost:9001/3.0/addresses/member-1@example.com",
"delivery_mode": "regular", "email": "member-1@example.com", "http_etag":
- "\"c01d1324b0e2b13b4f39d0f020bd775b7ec36c33\"", "list_id": "foo.example.com",
- "member_id": 11, "role": "member", "self_link": "http://localhost:9001/3.0/members/11",
- "user": "http://localhost:9001/3.0/users/11"}'}
+ "\"e0e12330684b2501c7ffba5c3b88356340f9904a\"", "list_id": "foo.example.com",
+ "member_id": 9, "role": "member", "self_link": "http://localhost:9001/3.0/members/9",
+ "user": "http://localhost:9001/3.0/users/5"}'}
headers:
- content-length: ['357']
+ content-length: ['354']
content-type: [application/json; charset=UTF-8]
status: {code: 200, message: OK}
- request:
@@ -192,15 +189,15 @@
headers:
accept-encoding: ['gzip, deflate']
method: !!python/unicode GET
- uri: http://localhost:9001/3.0/members/12
+ uri: http://localhost:9001/3.0/members/10
response:
body: {string: !!python/unicode '{"address": "http://localhost:9001/3.0/addresses/member-2@example.com",
"delivery_mode": "regular", "email": "member-2@example.com", "http_etag":
- "\"c042a3bf7ddfa6b4b3f6cfc0f94947cac8ec4d69\"", "list_id": "foo.example.com",
- "member_id": 12, "role": "member", "self_link": "http://localhost:9001/3.0/members/12",
- "user": "http://localhost:9001/3.0/users/12"}'}
+ "\"233a7991f62ebe214a13301caa0ebba5a0047669\"", "list_id": "foo.example.com",
+ "member_id": 10, "role": "member", "self_link": "http://localhost:9001/3.0/members/10",
+ "user": "http://localhost:9001/3.0/users/6"}'}
headers:
- content-length: ['357']
+ content-length: ['356']
content-type: [application/json; charset=UTF-8]
status: {code: 200, message: OK}
- request:
@@ -210,11 +207,29 @@
method: !!python/unicode GET
uri: http://localhost:9001/3.0/users/su@example.com
response:
- body: {string: !!python/unicode 404 Not Found}
+ body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag":
+ "\"b36f8ca1d91d583901c768dc116815282d469c66\"", "is_server_owner": false,
+ "self_link": "http://localhost:9001/3.0/users/2", "user_id": 2}'}
headers:
- content-length: ['13']
+ content-length: ['188']
content-type: [application/json; charset=UTF-8]
- status: {code: 404, message: Not Found}
+ status: {code: 200, message: OK}
+- request:
+ body: null
+ headers:
+ accept-encoding: ['gzip, deflate']
+ method: !!python/unicode GET
+ uri: http://localhost:9001/3.0/users/2/addresses
+ response:
+ body: {string: !!python/unicode '{"entries": [{"email": "su@example.com", "http_etag":
+ "\"a8988d233ad4b9e8641ad5d75553912565efec83\"", "original_email": "su@example.com",
+ "registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/su@example.com",
+ "user": "http://localhost:9001/3.0/users/2"}], "http_etag": "\"7cc723891821fbf8b0974c2ec407cca11fbb6726\"",
+ "start": 0, "total_size": 1}'}
+ headers:
+ content-length: ['381']
+ content-type: [application/json; charset=UTF-8]
+ status: {code: 200, message: OK}
- request:
body: null
headers:
@@ -239,12 +254,12 @@
response:
body: {string: !!python/unicode '{"entries": [{"address": "http://localhost:9001/3.0/addresses/member-1@example.com",
"delivery_mode": "regular", "email": "member-1@example.com", "http_etag":
- "\"c01d1324b0e2b13b4f39d0f020bd775b7ec36c33\"", "list_id": "foo.example.com",
- "member_id": 11, "role": "member", "self_link": "http://localhost:9001/3.0/members/11",
- "user": "http://localhost:9001/3.0/users/11"}], "http_etag": "\"c8aaf5a3dba46fa120881e7ef883c4502f376924\"",
+ "\"e0e12330684b2501c7ffba5c3b88356340f9904a\"", "list_id": "foo.example.com",
+ "member_id": 9, "role": "member", "self_link": "http://localhost:9001/3.0/members/9",
+ "user": "http://localhost:9001/3.0/users/5"}], "http_etag": "\"09cc85910b40e5b560f97f0383348d00e7928969\"",
"start": 0, "total_size": 1}'}
headers:
- content-length: ['462']
+ content-length: ['459']
content-type: [application/json; charset=UTF-8]
status: {code: 200, message: OK}
- request:
@@ -256,33 +271,12 @@
response:
body: {string: !!python/unicode '{"entries": [{"address": "http://localhost:9001/3.0/addresses/member-1@example.com",
"delivery_mode": "regular", "email": "member-1@example.com", "http_etag":
- "\"c01d1324b0e2b13b4f39d0f020bd775b7ec36c33\"", "list_id": "foo.example.com",
- "member_id": 11, "role": "member", "self_link": "http://localhost:9001/3.0/members/11",
- "user": "http://localhost:9001/3.0/users/11"}], "http_etag": "\"c8aaf5a3dba46fa120881e7ef883c4502f376924\"",
+ "\"e0e12330684b2501c7ffba5c3b88356340f9904a\"", "list_id": "foo.example.com",
+ "member_id": 9, "role": "member", "self_link": "http://localhost:9001/3.0/members/9",
+ "user": "http://localhost:9001/3.0/users/5"}], "http_etag": "\"09cc85910b40e5b560f97f0383348d00e7928969\"",
"start": 0, "total_size": 1}'}
headers:
- content-length: ['462']
- content-type: [application/json; charset=UTF-8]
- status: {code: 200, message: OK}
-- request:
- body: null
- headers:
- accept-encoding: ['gzip, deflate']
- method: !!python/unicode GET
- uri: http://localhost:9001/3.0/lists/foo@example.com/roster/member
- response:
- body: {string: !!python/unicode '{"entries": [{"address": "http://localhost:9001/3.0/addresses/member-1@example.com",
- "delivery_mode": "regular", "email": "member-1@example.com", "http_etag":
- "\"c01d1324b0e2b13b4f39d0f020bd775b7ec36c33\"", "list_id": "foo.example.com",
- "member_id": 11, "role": "member", "self_link": "http://localhost:9001/3.0/members/11",
- "user": "http://localhost:9001/3.0/users/11"}, {"address": "http://localhost:9001/3.0/addresses/member-2@example.com",
- "delivery_mode": "regular", "email": "member-2@example.com", "http_etag":
- "\"c042a3bf7ddfa6b4b3f6cfc0f94947cac8ec4d69\"", "list_id": "foo.example.com",
- "member_id": 12, "role": "member", "self_link": "http://localhost:9001/3.0/members/12",
- "user": "http://localhost:9001/3.0/users/12"}], "http_etag": "\"3a5e192d8d9eea2893f45b5fe35dc5395520515e\"",
- "start": 0, "total_size": 2}'}
- headers:
- content-length: ['821']
+ content-length: ['459']
content-type: [application/json; charset=UTF-8]
status: {code: 200, message: OK}
- request:
@@ -292,11 +286,29 @@
method: !!python/unicode GET
uri: http://localhost:9001/3.0/users/su@example.com
response:
- body: {string: !!python/unicode 404 Not Found}
+ body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag":
+ "\"b36f8ca1d91d583901c768dc116815282d469c66\"", "is_server_owner": false,
+ "self_link": "http://localhost:9001/3.0/users/2", "user_id": 2}'}
headers:
- content-length: ['13']
+ content-length: ['188']
content-type: [application/json; charset=UTF-8]
- status: {code: 404, message: Not Found}
+ status: {code: 200, message: OK}
+- request:
+ body: null
+ headers:
+ accept-encoding: ['gzip, deflate']
+ method: !!python/unicode GET
+ uri: http://localhost:9001/3.0/users/2/addresses
+ response:
+ body: {string: !!python/unicode '{"entries": [{"email": "su@example.com", "http_etag":
+ "\"a8988d233ad4b9e8641ad5d75553912565efec83\"", "original_email": "su@example.com",
+ "registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/su@example.com",
+ "user": "http://localhost:9001/3.0/users/2"}], "http_etag": "\"7cc723891821fbf8b0974c2ec407cca11fbb6726\"",
+ "start": 0, "total_size": 1}'}
+ headers:
+ content-length: ['381']
+ content-type: [application/json; charset=UTF-8]
+ status: {code: 200, message: OK}
- request:
body: null
headers:
@@ -342,27 +354,6 @@
body: null
headers:
accept-encoding: ['gzip, deflate']
- method: !!python/unicode GET
- uri: http://localhost:9001/3.0/lists/foo@example.com/roster/member
- response:
- body: {string: !!python/unicode '{"entries": [{"address": "http://localhost:9001/3.0/addresses/member-1@example.com",
- "delivery_mode": "regular", "email": "member-1@example.com", "http_etag":
- "\"c01d1324b0e2b13b4f39d0f020bd775b7ec36c33\"", "list_id": "foo.example.com",
- "member_id": 11, "role": "member", "self_link": "http://localhost:9001/3.0/members/11",
- "user": "http://localhost:9001/3.0/users/11"}, {"address": "http://localhost:9001/3.0/addresses/member-2@example.com",
- "delivery_mode": "regular", "email": "member-2@example.com", "http_etag":
- "\"c042a3bf7ddfa6b4b3f6cfc0f94947cac8ec4d69\"", "list_id": "foo.example.com",
- "member_id": 12, "role": "member", "self_link": "http://localhost:9001/3.0/members/12",
- "user": "http://localhost:9001/3.0/users/12"}], "http_etag": "\"3a5e192d8d9eea2893f45b5fe35dc5395520515e\"",
- "start": 0, "total_size": 2}'}
- headers:
- content-length: ['821']
- content-type: [application/json; charset=UTF-8]
- status: {code: 200, message: OK}
-- request:
- body: null
- headers:
- accept-encoding: ['gzip, deflate']
method: !!python/unicode DELETE
uri: http://localhost:9001/3.0/lists/foo.example.com/member/member-1@example.com
response:
@@ -388,11 +379,29 @@
method: !!python/unicode GET
uri: http://localhost:9001/3.0/users/su@example.com
response:
- body: {string: !!python/unicode 404 Not Found}
+ body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag":
+ "\"b36f8ca1d91d583901c768dc116815282d469c66\"", "is_server_owner": false,
+ "self_link": "http://localhost:9001/3.0/users/2", "user_id": 2}'}
headers:
- content-length: ['13']
+ content-length: ['188']
content-type: [application/json; charset=UTF-8]
- status: {code: 404, message: Not Found}
+ status: {code: 200, message: OK}
+- request:
+ body: null
+ headers:
+ accept-encoding: ['gzip, deflate']
+ method: !!python/unicode GET
+ uri: http://localhost:9001/3.0/users/2/addresses
+ response:
+ body: {string: !!python/unicode '{"entries": [{"email": "su@example.com", "http_etag":
+ "\"a8988d233ad4b9e8641ad5d75553912565efec83\"", "original_email": "su@example.com",
+ "registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/su@example.com",
+ "user": "http://localhost:9001/3.0/users/2"}], "http_etag": "\"7cc723891821fbf8b0974c2ec407cca11fbb6726\"",
+ "start": 0, "total_size": 1}'}
+ headers:
+ content-length: ['381']
+ content-type: [application/json; charset=UTF-8]
+ status: {code: 200, message: OK}
- request:
body: null
headers:
@@ -438,21 +447,8 @@
body: null
headers:
accept-encoding: ['gzip, deflate']
- method: !!python/unicode GET
- uri: http://localhost:9001/3.0/lists/foo@example.com/roster/member
- response:
- body: {string: !!python/unicode '{"http_etag": "\"32223434a0f3af4cdc4673d1fbc5bac1f6d98fd3\"",
- "start": 0, "total_size": 0}'}
- headers:
- content-length: ['90']
- content-type: [application/json; charset=UTF-8]
- status: {code: 200, message: OK}
-- request:
- body: null
- headers:
- accept-encoding: ['gzip, deflate']
method: !!python/unicode DELETE
- uri: http://localhost:9001/3.0/lists/foo@example.com
+ uri: http://localhost:9001/3.0/lists/foo.example.com
response:
body: {string: !!python/unicode ''}
headers:
diff --git a/src/postorius/tests/fixtures/vcr_cassettes/ListMembersTest.test_show_members_page.yaml b/src/postorius/tests/fixtures/vcr_cassettes/ListMembersTest.test_show_members_page.yaml
index 7938d97..ad3b69e 100644
--- a/src/postorius/tests/fixtures/vcr_cassettes/ListMembersTest.test_show_members_page.yaml
+++ b/src/postorius/tests/fixtures/vcr_cassettes/ListMembersTest.test_show_members_page.yaml
@@ -69,7 +69,7 @@
headers:
content-length: ['0']
content-type: [application/json; charset=UTF-8]
- location: ['http://localhost:9001/3.0/members/13']
+ location: ['http://localhost:9001/3.0/members/11']
status: {code: 201, message: Created}
- request:
body: display_name=None&list_id=foo.example.com&pre_approved=True&pre_confirmed=True&pre_verified=True&subscriber=member-2%40example.com
@@ -83,7 +83,7 @@
headers:
content-length: ['0']
content-type: [application/json; charset=UTF-8]
- location: ['http://localhost:9001/3.0/members/14']
+ location: ['http://localhost:9001/3.0/members/12']
status: {code: 201, message: Created}
- request:
body: null
@@ -92,11 +92,29 @@
method: !!python/unicode GET
uri: http://localhost:9001/3.0/users/su@example.com
response:
- body: {string: !!python/unicode 404 Not Found}
+ body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag":
+ "\"b36f8ca1d91d583901c768dc116815282d469c66\"", "is_server_owner": false,
+ "self_link": "http://localhost:9001/3.0/users/2", "user_id": 2}'}
headers:
- content-length: ['13']
+ content-length: ['188']
content-type: [application/json; charset=UTF-8]
- status: {code: 404, message: Not Found}
+ status: {code: 200, message: OK}
+- request:
+ body: null
+ headers:
+ accept-encoding: ['gzip, deflate']
+ method: !!python/unicode GET
+ uri: http://localhost:9001/3.0/users/2/addresses
+ response:
+ body: {string: !!python/unicode '{"entries": [{"email": "su@example.com", "http_etag":
+ "\"a8988d233ad4b9e8641ad5d75553912565efec83\"", "original_email": "su@example.com",
+ "registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/su@example.com",
+ "user": "http://localhost:9001/3.0/users/2"}], "http_etag": "\"7cc723891821fbf8b0974c2ec407cca11fbb6726\"",
+ "start": 0, "total_size": 1}'}
+ headers:
+ content-length: ['381']
+ content-type: [application/json; charset=UTF-8]
+ status: {code: 200, message: OK}
- request:
body: null
headers:
@@ -121,12 +139,12 @@
response:
body: {string: !!python/unicode '{"entries": [{"address": "http://localhost:9001/3.0/addresses/member-1@example.com",
"delivery_mode": "regular", "email": "member-1@example.com", "http_etag":
- "\"bdda31b94cd3ababa7bbf0a05c8066fe75cc6ffd\"", "list_id": "foo.example.com",
- "member_id": 13, "role": "member", "self_link": "http://localhost:9001/3.0/members/13",
- "user": "http://localhost:9001/3.0/users/11"}], "http_etag": "\"0acfb6a96cc8b7bd0b4cec828f3cf8e38735e6cb\"",
+ "\"24cec09a6e07f5597d4fbc83689c9034afec9fc2\"", "list_id": "foo.example.com",
+ "member_id": 11, "role": "member", "self_link": "http://localhost:9001/3.0/members/11",
+ "user": "http://localhost:9001/3.0/users/5"}], "http_etag": "\"26f5832c8f6b95fb67b6c3026fa68544aba149ec\"",
"start": 0, "total_size": 2}'}
headers:
- content-length: ['462']
+ content-length: ['461']
content-type: [application/json; charset=UTF-8]
status: {code: 200, message: OK}
- request:
@@ -138,16 +156,16 @@
response:
body: {string: !!python/unicode '{"entries": [{"address": "http://localhost:9001/3.0/addresses/member-1@example.com",
"delivery_mode": "regular", "email": "member-1@example.com", "http_etag":
- "\"bdda31b94cd3ababa7bbf0a05c8066fe75cc6ffd\"", "list_id": "foo.example.com",
- "member_id": 13, "role": "member", "self_link": "http://localhost:9001/3.0/members/13",
- "user": "http://localhost:9001/3.0/users/11"}, {"address": "http://localhost:9001/3.0/addresses/member-2@example.com",
+ "\"24cec09a6e07f5597d4fbc83689c9034afec9fc2\"", "list_id": "foo.example.com",
+ "member_id": 11, "role": "member", "self_link": "http://localhost:9001/3.0/members/11",
+ "user": "http://localhost:9001/3.0/users/5"}, {"address": "http://localhost:9001/3.0/addresses/member-2@example.com",
"delivery_mode": "regular", "email": "member-2@example.com", "http_etag":
- "\"046101b574fd86fb98eaa597148508a84e3216f9\"", "list_id": "foo.example.com",
- "member_id": 14, "role": "member", "self_link": "http://localhost:9001/3.0/members/14",
- "user": "http://localhost:9001/3.0/users/12"}], "http_etag": "\"58e2521db804c0488db980de61a14d62ebbf303c\"",
+ "\"17654978c78e90d7f6512d33948bbb51e3d241ff\"", "list_id": "foo.example.com",
+ "member_id": 12, "role": "member", "self_link": "http://localhost:9001/3.0/members/12",
+ "user": "http://localhost:9001/3.0/users/6"}], "http_etag": "\"25076a1424e2731f9551fa21cdb7ab7018553013\"",
"start": 0, "total_size": 2}'}
headers:
- content-length: ['821']
+ content-length: ['819']
content-type: [application/json; charset=UTF-8]
status: {code: 200, message: OK}
- request:
@@ -155,36 +173,15 @@
headers:
accept-encoding: ['gzip, deflate']
method: !!python/unicode GET
- uri: http://localhost:9001/3.0/lists/foo@example.com/roster/member
- response:
- body: {string: !!python/unicode '{"entries": [{"address": "http://localhost:9001/3.0/addresses/member-1@example.com",
- "delivery_mode": "regular", "email": "member-1@example.com", "http_etag":
- "\"bdda31b94cd3ababa7bbf0a05c8066fe75cc6ffd\"", "list_id": "foo.example.com",
- "member_id": 13, "role": "member", "self_link": "http://localhost:9001/3.0/members/13",
- "user": "http://localhost:9001/3.0/users/11"}, {"address": "http://localhost:9001/3.0/addresses/member-2@example.com",
- "delivery_mode": "regular", "email": "member-2@example.com", "http_etag":
- "\"046101b574fd86fb98eaa597148508a84e3216f9\"", "list_id": "foo.example.com",
- "member_id": 14, "role": "member", "self_link": "http://localhost:9001/3.0/members/14",
- "user": "http://localhost:9001/3.0/users/12"}], "http_etag": "\"58e2521db804c0488db980de61a14d62ebbf303c\"",
- "start": 0, "total_size": 2}'}
- headers:
- content-length: ['821']
- content-type: [application/json; charset=UTF-8]
- status: {code: 200, message: OK}
-- request:
- body: null
- headers:
- accept-encoding: ['gzip, deflate']
- method: !!python/unicode GET
- uri: http://localhost:9001/3.0/members/13
+ uri: http://localhost:9001/3.0/members/11
response:
body: {string: !!python/unicode '{"address": "http://localhost:9001/3.0/addresses/member-1@example.com",
"delivery_mode": "regular", "email": "member-1@example.com", "http_etag":
- "\"bdda31b94cd3ababa7bbf0a05c8066fe75cc6ffd\"", "list_id": "foo.example.com",
- "member_id": 13, "role": "member", "self_link": "http://localhost:9001/3.0/members/13",
- "user": "http://localhost:9001/3.0/users/11"}'}
+ "\"24cec09a6e07f5597d4fbc83689c9034afec9fc2\"", "list_id": "foo.example.com",
+ "member_id": 11, "role": "member", "self_link": "http://localhost:9001/3.0/members/11",
+ "user": "http://localhost:9001/3.0/users/5"}'}
headers:
- content-length: ['357']
+ content-length: ['356']
content-type: [application/json; charset=UTF-8]
status: {code: 200, message: OK}
- request:
@@ -192,15 +189,15 @@
headers:
accept-encoding: ['gzip, deflate']
method: !!python/unicode GET
- uri: http://localhost:9001/3.0/members/14
+ uri: http://localhost:9001/3.0/members/12
response:
body: {string: !!python/unicode '{"address": "http://localhost:9001/3.0/addresses/member-2@example.com",
"delivery_mode": "regular", "email": "member-2@example.com", "http_etag":
- "\"046101b574fd86fb98eaa597148508a84e3216f9\"", "list_id": "foo.example.com",
- "member_id": 14, "role": "member", "self_link": "http://localhost:9001/3.0/members/14",
- "user": "http://localhost:9001/3.0/users/12"}'}
+ "\"17654978c78e90d7f6512d33948bbb51e3d241ff\"", "list_id": "foo.example.com",
+ "member_id": 12, "role": "member", "self_link": "http://localhost:9001/3.0/members/12",
+ "user": "http://localhost:9001/3.0/users/6"}'}
headers:
- content-length: ['357']
+ content-length: ['356']
content-type: [application/json; charset=UTF-8]
status: {code: 200, message: OK}
- request:
@@ -208,7 +205,7 @@
headers:
accept-encoding: ['gzip, deflate']
method: !!python/unicode DELETE
- uri: http://localhost:9001/3.0/lists/foo@example.com
+ uri: http://localhost:9001/3.0/lists/foo.example.com
response:
body: {string: !!python/unicode ''}
headers:
diff --git a/src/postorius/tests/mailman_api_tests/test_address_activation.py b/src/postorius/tests/mailman_api_tests/test_address_activation.py
index 8bd277a..3ea3316 100644
--- a/src/postorius/tests/mailman_api_tests/test_address_activation.py
+++ b/src/postorius/tests/mailman_api_tests/test_address_activation.py
@@ -126,7 +126,8 @@
@override_settings(
EMAIL_BACKEND='django.core.mail.backends.locmem.EmailBackend',
- EMAIL_CONFIRMATION_FROM='mailman@mostdesirable.org')
+ EMAIL_CONFIRMATION_FROM='mailman@mostdesirable.org',
+ ALLOWED_HOSTS=['another-virtualhost'])
def test_confirmation_link(self):
# The profile obj can send out a confirmation email.
# Simulate a VirtualHost with a different name
diff --git a/src/postorius/tests/mailman_api_tests/test_list_bans.py b/src/postorius/tests/mailman_api_tests/test_list_bans.py
index a071b7a..fdf2af1 100644
--- a/src/postorius/tests/mailman_api_tests/test_list_bans.py
+++ b/src/postorius/tests/mailman_api_tests/test_list_bans.py
@@ -60,7 +60,7 @@
self.assertTrue('addban_form' in response.context)
self.assertContains(
response, '')
+ 'name="email" type="text" ')
self.assertContains(
response, '')
diff --git a/src/postorius/utils.py b/src/postorius/utils.py
index b393568..b99a5ad 100644
--- a/src/postorius/utils.py
+++ b/src/postorius/utils.py
@@ -20,6 +20,7 @@
from django.conf import settings
from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger
from django.shortcuts import render
+from django.utils.functional import cached_property
from mailmanclient import Client
from django.utils.translation import gettext as _
@@ -61,21 +62,16 @@
"""
number = self.validate_number(number)
result = self.function(count=self.per_page, page=number)
- if self._count is None:
- self._count = result.total_size
return self._get_page(result, number, self)
- def _get_count(self):
+ @cached_property
+ def count(self):
"""
Returns the total number of objects, across all pages.
"""
- if self._count is None:
- # For now we need to get the first page to have the total_size.
- # Mitigate the price of this call by using count=1.
- result = self.function(count=1, page=1)
- self._count = result.total_size
- return self._count
- count = property(_get_count)
+ # For now we need to get the first page to have the total_size.
+ # Mitigate the price of this call by using count=1.
+ return self.function(count=1, page=1).total_size
def paginate(request, collection, count=20, paginator_class=Paginator):
diff --git a/src/postorius/views/user.py b/src/postorius/views/user.py
index 77d35dc..28c71d5 100644
--- a/src/postorius/views/user.py
+++ b/src/postorius/views/user.py
@@ -102,7 +102,8 @@
for form, address in zip(formset.forms, mm_user.addresses):
preferences = address.preferences
for key in form.fields.keys():
- if form.cleaned_data[key] is not None:
+ if (key in form.cleaned_data and
+ form.cleaned_data[key] is not None):
# None: nothing set yet. Remember to remove this
# test when Mailman accepts None as a
# "reset to default" value.
diff --git a/tox.ini b/tox.ini
index f86115c..aa72404 100644
--- a/tox.ini
+++ b/tox.ini
@@ -1,5 +1,5 @@
[tox]
-envlist = py27-django{18,19},pep8
+envlist = py27-django{18,19,110},pep8
[base]
deps =
@@ -13,7 +13,8 @@
deps =
{[base]deps}
django18: Django>=1.8,<1.9
- django19: Django>=1.9,<1.10a
+ django19: Django>=1.9,<1.10
+ django110: Django>=1.10,<1.11
django-latest: https://github.com/django/django/archive/master.tar.gz
commands =
coverage run example_project/manage.py test --settings=test_settings {posargs:postorius}