diff --git a/src/postorius/tests/fixtures/vcr_cassettes/ListMembersAccessTest.test_not_accessible_for_moderator.yaml b/src/postorius/tests/fixtures/vcr_cassettes/ListMembersAccessTest.test_not_accessible_for_moderator.yaml index 19bccff..aa3a9e1 100644 --- a/src/postorius/tests/fixtures/vcr_cassettes/ListMembersAccessTest.test_not_accessible_for_moderator.yaml +++ b/src/postorius/tests/fixtures/vcr_cassettes/ListMembersAccessTest.test_not_accessible_for_moderator.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=owner%40example.com @@ -66,7 +68,8 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - location: ['http://localhost:9001/3.0/members/9'] + content-type: [application/json; charset=UTF-8] + location: ['http://localhost:9001/3.0/members/1'] status: {code: 201, message: Created} - request: body: list_id=foo.example.com&role=moderator&subscriber=moderator%40example.com @@ -79,7 +82,8 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - location: ['http://localhost:9001/3.0/members/10'] + content-type: [application/json; charset=UTF-8] + location: ['http://localhost:9001/3.0/members/2'] status: {code: 201, message: Created} - request: body: null @@ -89,28 +93,28 @@ uri: http://localhost:9001/3.0/users/moderator@example.com response: body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag": - "\"4c816726023bb1daf76d48e82b250689df6a4694\"", "is_server_owner": false, - "self_link": "http://localhost:9001/3.0/users/11", "user_id": 11}'} + "\"b36f8ca1d91d583901c768dc116815282d469c66\"", "is_server_owner": false, + "self_link": "http://localhost:9001/3.0/users/2", "user_id": 2}'} headers: - content-length: ['190'] - content-type: [application/json; charset=utf-8] + content-length: ['188'] + 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/11/addresses + uri: http://localhost:9001/3.0/users/2/addresses response: body: {string: !!python/unicode '{"entries": [{"email": "moderator@example.com", - "http_etag": "\"d1e57418dc20a4afd98efb490632b094680ab958\"", "original_email": + "http_etag": "\"d66892925a5affe7cea14d53f0bca01231ca8678\"", "original_email": "moderator@example.com", "registered_on": "2005-08-01T07:49:23", "self_link": - "http://localhost:9001/3.0/addresses/moderator@example.com", "user": "http://localhost:9001/3.0/users/11"}], - "http_etag": "\"dd4cc658c98ed34e5420d37e6ecb5293f5b3182c\"", "start": 0, "total_size": + "http://localhost:9001/3.0/addresses/moderator@example.com", "user": "http://localhost:9001/3.0/users/2"}], + "http_etag": "\"0811f8b56d843ad04a8d71ed461ea6f9dafebdb4\"", "start": 0, "total_size": 1}'} headers: - content-length: ['403'] - content-type: [application/json; charset=utf-8] + content-length: ['402'] + content-type: [application/json; charset=UTF-8] status: {code: 200, message: OK} - request: body: null @@ -125,7 +129,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 @@ -135,14 +139,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/owner@example.com", - "delivery_mode": "regular", "email": "owner@example.com", "http_etag": "\"8f61e5905b5af26c1959dc0aadbe9dcdbfadd3f0\"", - "list_id": "foo.example.com", "member_id": 9, "moderation_action": "accept", - "role": "owner", "self_link": "http://localhost:9001/3.0/members/9", "user": - "http://localhost:9001/3.0/users/10"}], "http_etag": "\"3b6b0d93a464b25e8e0a9bd7fb45aa122af53cb1\"", + "delivery_mode": "regular", "email": "owner@example.com", "http_etag": "\"11aea171dc5df92af684a864f617be79e7d8a603\"", + "list_id": "foo.example.com", "member_id": 1, "moderation_action": "accept", + "role": "owner", "self_link": "http://localhost:9001/3.0/members/1", "user": + "http://localhost:9001/3.0/users/1"}], "http_etag": "\"802adaf7a699faae959236bbef39d3f39b24f40f\"", "start": 0, "total_size": 1}'} headers: - content-length: ['484'] - content-type: [application/json; charset=utf-8] + content-length: ['483'] + content-type: [application/json; charset=UTF-8] status: {code: 200, message: OK} - request: body: null @@ -153,14 +157,14 @@ response: body: {string: !!python/unicode '{"entries": [{"address": "http://localhost:9001/3.0/addresses/moderator@example.com", "delivery_mode": "regular", "email": "moderator@example.com", "http_etag": - "\"adb33af2350d789ed5b19ebb4a97660dc9fdc583\"", "list_id": "foo.example.com", - "member_id": 10, "moderation_action": "accept", "role": "moderator", "self_link": - "http://localhost:9001/3.0/members/10", "user": "http://localhost:9001/3.0/users/11"}], - "http_etag": "\"e33a41f0881bff0f02b2dd36b3a0705daeb029bd\"", "start": 0, "total_size": + "\"80dcfe2946d08e9764e9281c3373a1b58550e86f\"", "list_id": "foo.example.com", + "member_id": 2, "moderation_action": "accept", "role": "moderator", "self_link": + "http://localhost:9001/3.0/members/2", "user": "http://localhost:9001/3.0/users/2"}], + "http_etag": "\"d62762ec998e9528fcdbf41df839bad8f446e5ca\"", "start": 0, "total_size": 1}'} headers: - content-length: ['498'] - content-type: [application/json; charset=utf-8] + content-length: ['495'] + content-type: [application/json; charset=UTF-8] status: {code: 200, message: OK} - request: body: null @@ -176,7 +180,7 @@ "start": 0, "total_size": 1}'} headers: content-length: ['338'] - content-type: [application/json; charset=utf-8] + content-type: [application/json; charset=UTF-8] status: {code: 200, message: OK} - request: body: null @@ -197,30 +201,22 @@ uri: http://localhost:9001/3.0/users response: body: {string: !!python/unicode '{"entries": [{"created_on": "2005-08-01T07:49:23", - "http_etag": "\"b774d488fd2356b7bedf0e6fa4a26dc70dc2b02b\"", "is_server_owner": - false, "self_link": "http://localhost:9001/3.0/users/6", "user_id": 6}, {"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}, {"created_on": "2005-08-01T07:49:23", "http_etag": "\"9f85bec9adf1f795257120c028ebcd42df491bcb\"", - "is_server_owner": false, "self_link": "http://localhost:9001/3.0/users/8", - "user_id": 8}, {"created_on": "2005-08-01T07:49:23", "http_etag": "\"d3653a82ed2e228300cde355e9d15020657bfb86\"", - "is_server_owner": false, "self_link": "http://localhost:9001/3.0/users/9", - "user_id": 9}, {"created_on": "2005-08-01T07:49:23", "http_etag": "\"40c88498622198c212181e9ff106e60a3cba46ed\"", - "is_server_owner": false, "self_link": "http://localhost:9001/3.0/users/10", - "user_id": 10}, {"created_on": "2005-08-01T07:49:23", "http_etag": "\"4c816726023bb1daf76d48e82b250689df6a4694\"", - "is_server_owner": false, "self_link": "http://localhost:9001/3.0/users/11", - "user_id": 11}], "http_etag": "\"2abdef20ace1d413b61a954e137ec56264226b6a\"", - "start": 0, "total_size": 6}'} + "http_etag": "\"eb591d9720aa0ac944b49315b6af1c950410b54c\"", "is_server_owner": + false, "self_link": "http://localhost:9001/3.0/users/1", "user_id": 1}, {"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}], "http_etag": "\"02a1b3f934bd7d185e0442a63a169c0f3f356f60\"", + "start": 0, "total_size": 2}'} headers: - content-length: ['1247'] - content-type: [application/json; charset=utf-8] + content-length: ['483'] + 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/users/10 + uri: http://localhost:9001/3.0/users/1 response: body: {string: !!python/unicode ''} headers: @@ -231,51 +227,7 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode DELETE - uri: http://localhost:9001/3.0/users/11 - response: - body: {string: !!python/unicode ''} - headers: - content-length: ['0'] - status: {code: 204, message: No Content} -- request: - body: null - headers: - accept-encoding: ['gzip, deflate'] - method: !!python/unicode DELETE - uri: http://localhost:9001/3.0/users/6 - response: - body: {string: !!python/unicode ''} - headers: - content-length: ['0'] - status: {code: 204, message: No Content} -- request: - body: null - headers: - accept-encoding: ['gzip, deflate'] - method: !!python/unicode DELETE - uri: http://localhost:9001/3.0/users/7 - response: - body: {string: !!python/unicode ''} - headers: - content-length: ['0'] - status: {code: 204, message: No Content} -- request: - body: null - headers: - accept-encoding: ['gzip, deflate'] - method: !!python/unicode DELETE - uri: http://localhost:9001/3.0/users/8 - response: - body: {string: !!python/unicode ''} - headers: - content-length: ['0'] - status: {code: 204, message: No Content} -- request: - body: null - headers: - accept-encoding: ['gzip, deflate'] - method: !!python/unicode DELETE - uri: http://localhost:9001/3.0/users/9 + uri: http://localhost:9001/3.0/users/2 response: body: {string: !!python/unicode ''} headers: diff --git a/src/postorius/tests/fixtures/vcr_cassettes/ListMembersAccessTest.test_page_accessible_for_owner.yaml b/src/postorius/tests/fixtures/vcr_cassettes/ListMembersAccessTest.test_page_accessible_for_owner.yaml index 96f1813..698f9e6 100644 --- a/src/postorius/tests/fixtures/vcr_cassettes/ListMembersAccessTest.test_page_accessible_for_owner.yaml +++ b/src/postorius/tests/fixtures/vcr_cassettes/ListMembersAccessTest.test_page_accessible_for_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=owner%40example.com @@ -66,7 +68,8 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - location: ['http://localhost:9001/3.0/members/11'] + content-type: [application/json; charset=UTF-8] + location: ['http://localhost:9001/3.0/members/3'] status: {code: 201, message: Created} - request: body: list_id=foo.example.com&role=moderator&subscriber=moderator%40example.com @@ -79,7 +82,8 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - location: ['http://localhost:9001/3.0/members/12'] + content-type: [application/json; charset=UTF-8] + location: ['http://localhost:9001/3.0/members/4'] status: {code: 201, message: Created} - request: body: null @@ -89,27 +93,27 @@ uri: http://localhost:9001/3.0/users/owner@example.com response: body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag": - "\"87648caa0e3380982e197beebf79e468670de477\"", "is_server_owner": false, - "self_link": "http://localhost:9001/3.0/users/12", "user_id": 12}'} + "\"bb1c2e6094a96b17e2d5dbf487291f7667f69f75\"", "is_server_owner": false, + "self_link": "http://localhost:9001/3.0/users/3", "user_id": 3}'} headers: - content-length: ['190'] - content-type: [application/json; charset=utf-8] + content-length: ['188'] + 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/12/addresses + uri: http://localhost:9001/3.0/users/3/addresses response: body: {string: !!python/unicode '{"entries": [{"email": "owner@example.com", "http_etag": - "\"12f4aef05d85e9e0f6ba3ad35464807315a0f403\"", "original_email": "owner@example.com", + "\"9b7e4ba7721338ab16619f69a74fdf6b7921c289\"", "original_email": "owner@example.com", "registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/owner@example.com", - "user": "http://localhost:9001/3.0/users/12"}], "http_etag": "\"3fbd8078d58162d668205f05a4be33d1acdf73c2\"", + "user": "http://localhost:9001/3.0/users/3"}], "http_etag": "\"b217d5409fbf8befcb8c31825a74e70470e5f5a2\"", "start": 0, "total_size": 1}'} headers: - content-length: ['391'] - content-type: [application/json; charset=utf-8] + content-length: ['390'] + content-type: [application/json; charset=UTF-8] status: {code: 200, message: OK} - request: body: null @@ -124,7 +128,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 @@ -134,14 +138,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/owner@example.com", - "delivery_mode": "regular", "email": "owner@example.com", "http_etag": "\"28e7558e655368e69c18d7ec69a4bd02d93a7777\"", - "list_id": "foo.example.com", "member_id": 11, "moderation_action": "accept", - "role": "owner", "self_link": "http://localhost:9001/3.0/members/11", "user": - "http://localhost:9001/3.0/users/12"}], "http_etag": "\"7f2da206e0882d20be653e1bb83082872b8ca26b\"", + "delivery_mode": "regular", "email": "owner@example.com", "http_etag": "\"df215d837d2610ab3523418a8d9585238854bb49\"", + "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/3"}], "http_etag": "\"d1d412c20b7645203e4c733eda1f8afaf4624d83\"", "start": 0, "total_size": 1}'} headers: - content-length: ['486'] - content-type: [application/json; charset=utf-8] + content-length: ['483'] + content-type: [application/json; charset=UTF-8] status: {code: 200, message: OK} - request: body: null @@ -152,14 +156,14 @@ response: body: {string: !!python/unicode '{"entries": [{"address": "http://localhost:9001/3.0/addresses/moderator@example.com", "delivery_mode": "regular", "email": "moderator@example.com", "http_etag": - "\"8685fe89e9220bd0edb484dd788476fc62d7fcf2\"", "list_id": "foo.example.com", - "member_id": 12, "moderation_action": "accept", "role": "moderator", "self_link": - "http://localhost:9001/3.0/members/12", "user": "http://localhost:9001/3.0/users/13"}], - "http_etag": "\"02a841abd866594dc4eb43e554ae096772ddac35\"", "start": 0, "total_size": + "\"2719ced3f4bf6a0a4f635a0acb678677a453b16e\"", "list_id": "foo.example.com", + "member_id": 4, "moderation_action": "accept", "role": "moderator", "self_link": + "http://localhost:9001/3.0/members/4", "user": "http://localhost:9001/3.0/users/4"}], + "http_etag": "\"a9d400540a00a272f1904ec9eab01b1700d45a3c\"", "start": 0, "total_size": 1}'} headers: - content-length: ['498'] - content-type: [application/json; charset=utf-8] + content-length: ['495'] + content-type: [application/json; charset=UTF-8] status: {code: 200, message: OK} - request: body: null @@ -174,7 +178,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 @@ -187,7 +191,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 @@ -200,7 +204,20 @@ "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 + 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 @@ -216,7 +233,7 @@ "start": 0, "total_size": 1}'} headers: content-length: ['338'] - content-type: [application/json; charset=utf-8] + content-type: [application/json; charset=UTF-8] status: {code: 200, message: OK} - request: body: null @@ -237,22 +254,22 @@ uri: http://localhost:9001/3.0/users response: body: {string: !!python/unicode '{"entries": [{"created_on": "2005-08-01T07:49:23", - "http_etag": "\"87648caa0e3380982e197beebf79e468670de477\"", "is_server_owner": - false, "self_link": "http://localhost:9001/3.0/users/12", "user_id": 12}, - {"created_on": "2005-08-01T07:49:23", "http_etag": "\"007cc78d77622058dc0f70458877d09487378a12\"", - "is_server_owner": false, "self_link": "http://localhost:9001/3.0/users/13", - "user_id": 13}], "http_etag": "\"4d89be8915d152da0c9e9864346a136046d8b1c9\"", + "http_etag": "\"bb1c2e6094a96b17e2d5dbf487291f7667f69f75\"", "is_server_owner": + false, "self_link": "http://localhost:9001/3.0/users/3", "user_id": 3}, {"created_on": + "2005-08-01T07:49:23", "http_etag": "\"c1dcbf16536eb2e2151441f4bce2989ab1dab30b\"", + "is_server_owner": false, "self_link": "http://localhost:9001/3.0/users/4", + "user_id": 4}], "http_etag": "\"8f3f78e0a24b92a40100375b7c9eeac5c8c65407\"", "start": 0, "total_size": 2}'} headers: - content-length: ['487'] - content-type: [application/json; charset=utf-8] + content-length: ['483'] + 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/users/12 + uri: http://localhost:9001/3.0/users/3 response: body: {string: !!python/unicode ''} headers: @@ -263,7 +280,7 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode DELETE - uri: http://localhost:9001/3.0/users/13 + uri: http://localhost:9001/3.0/users/4 response: body: {string: !!python/unicode ''} headers: diff --git a/src/postorius/tests/fixtures/vcr_cassettes/ListMembersAccessTest.test_page_accessible_for_superuser.yaml b/src/postorius/tests/fixtures/vcr_cassettes/ListMembersAccessTest.test_page_accessible_for_superuser.yaml index 6a8f43f..d5193eb 100644 --- a/src/postorius/tests/fixtures/vcr_cassettes/ListMembersAccessTest.test_page_accessible_for_superuser.yaml +++ b/src/postorius/tests/fixtures/vcr_cassettes/ListMembersAccessTest.test_page_accessible_for_superuser.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=owner%40example.com @@ -66,7 +68,8 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - location: ['http://localhost:9001/3.0/members/13'] + content-type: [application/json; charset=UTF-8] + location: ['http://localhost:9001/3.0/members/5'] status: {code: 201, message: Created} - request: body: list_id=foo.example.com&role=moderator&subscriber=moderator%40example.com @@ -79,7 +82,8 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - location: ['http://localhost:9001/3.0/members/14'] + content-type: [application/json; charset=UTF-8] + location: ['http://localhost:9001/3.0/members/6'] status: {code: 201, message: Created} - request: body: null @@ -91,7 +95,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 @@ -106,7 +110,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 @@ -119,7 +123,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 @@ -132,7 +136,20 @@ "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 + 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 @@ -148,7 +165,7 @@ "start": 0, "total_size": 1}'} headers: content-length: ['338'] - content-type: [application/json; charset=utf-8] + content-type: [application/json; charset=UTF-8] status: {code: 200, message: OK} - request: body: null @@ -169,22 +186,22 @@ uri: http://localhost:9001/3.0/users response: body: {string: !!python/unicode '{"entries": [{"created_on": "2005-08-01T07:49:23", - "http_etag": "\"0151e0193b20e2c0ad85bb8486f2147bea762806\"", "is_server_owner": - false, "self_link": "http://localhost:9001/3.0/users/14", "user_id": 14}, - {"created_on": "2005-08-01T07:49:23", "http_etag": "\"7fdaa4ece5394af7c6dd1bf6edfee29801843395\"", - "is_server_owner": false, "self_link": "http://localhost:9001/3.0/users/15", - "user_id": 15}], "http_etag": "\"96bd570c20bc424a18ab16afb38cbb41abb5260a\"", + "http_etag": "\"637c12d15eb0203c9ffac9ea2d5ac8605d18e38d\"", "is_server_owner": + false, "self_link": "http://localhost:9001/3.0/users/5", "user_id": 5}, {"created_on": + "2005-08-01T07:49:23", "http_etag": "\"b774d488fd2356b7bedf0e6fa4a26dc70dc2b02b\"", + "is_server_owner": false, "self_link": "http://localhost:9001/3.0/users/6", + "user_id": 6}], "http_etag": "\"c99e9a6fdf01f14e8fb4669bd208f4c519b83933\"", "start": 0, "total_size": 2}'} headers: - content-length: ['487'] - content-type: [application/json; charset=utf-8] + content-length: ['483'] + 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/users/14 + uri: http://localhost:9001/3.0/users/5 response: body: {string: !!python/unicode ''} headers: @@ -195,7 +212,7 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode DELETE - uri: http://localhost:9001/3.0/users/15 + uri: http://localhost:9001/3.0/users/6 response: body: {string: !!python/unicode ''} headers: diff --git a/src/postorius/tests/fixtures/vcr_cassettes/ListMembersAccessTest.test_page_not_accessible_for_unprivileged_users.yaml b/src/postorius/tests/fixtures/vcr_cassettes/ListMembersAccessTest.test_page_not_accessible_for_unprivileged_users.yaml index bbca8d7..554b269 100644 --- a/src/postorius/tests/fixtures/vcr_cassettes/ListMembersAccessTest.test_page_not_accessible_for_unprivileged_users.yaml +++ b/src/postorius/tests/fixtures/vcr_cassettes/ListMembersAccessTest.test_page_not_accessible_for_unprivileged_users.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=owner%40example.com @@ -66,7 +68,8 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - location: ['http://localhost:9001/3.0/members/15'] + content-type: [application/json; charset=UTF-8] + location: ['http://localhost:9001/3.0/members/7'] status: {code: 201, message: Created} - request: body: list_id=foo.example.com&role=moderator&subscriber=moderator%40example.com @@ -79,7 +82,8 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - location: ['http://localhost:9001/3.0/members/16'] + content-type: [application/json; charset=UTF-8] + location: ['http://localhost:9001/3.0/members/8'] status: {code: 201, message: Created} - request: body: null @@ -91,7 +95,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 @@ -106,7 +110,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 @@ -116,14 +120,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/owner@example.com", - "delivery_mode": "regular", "email": "owner@example.com", "http_etag": "\"2cf564c08c682ec94e01d7685dc14eadf342de80\"", - "list_id": "foo.example.com", "member_id": 15, "moderation_action": "accept", - "role": "owner", "self_link": "http://localhost:9001/3.0/members/15", "user": - "http://localhost:9001/3.0/users/16"}], "http_etag": "\"f0cefc2c95e89d58556a6cd944c834b1c80d52dc\"", + "delivery_mode": "regular", "email": "owner@example.com", "http_etag": "\"776a09d90204935e7d125fce3c160f06d2a98155\"", + "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": "\"2a92d22ca2421f26632227565034353f36bc658c\"", "start": 0, "total_size": 1}'} headers: - content-length: ['486'] - content-type: [application/json; charset=utf-8] + content-length: ['483'] + content-type: [application/json; charset=UTF-8] status: {code: 200, message: OK} - request: body: null @@ -134,14 +138,14 @@ response: body: {string: !!python/unicode '{"entries": [{"address": "http://localhost:9001/3.0/addresses/moderator@example.com", "delivery_mode": "regular", "email": "moderator@example.com", "http_etag": - "\"3d9bc77ab406b52c2a71af75616cc6f82a25673e\"", "list_id": "foo.example.com", - "member_id": 16, "moderation_action": "accept", "role": "moderator", "self_link": - "http://localhost:9001/3.0/members/16", "user": "http://localhost:9001/3.0/users/17"}], - "http_etag": "\"254a3b743810bd9a16eb463b5f430b89653381bb\"", "start": 0, "total_size": + "\"1d14e6e615be285d3926aace6c71fd58418533b6\"", "list_id": "foo.example.com", + "member_id": 8, "moderation_action": "accept", "role": "moderator", "self_link": + "http://localhost:9001/3.0/members/8", "user": "http://localhost:9001/3.0/users/8"}], + "http_etag": "\"b2b67d3f4db3a3effcaa64bb69aef4ef93b94aad\"", "start": 0, "total_size": 1}'} headers: - content-length: ['498'] - content-type: [application/json; charset=utf-8] + content-length: ['495'] + content-type: [application/json; charset=UTF-8] status: {code: 200, message: OK} - request: body: null @@ -157,7 +161,7 @@ "start": 0, "total_size": 1}'} headers: content-length: ['338'] - content-type: [application/json; charset=utf-8] + content-type: [application/json; charset=UTF-8] status: {code: 200, message: OK} - request: body: null @@ -178,22 +182,22 @@ uri: http://localhost:9001/3.0/users response: body: {string: !!python/unicode '{"entries": [{"created_on": "2005-08-01T07:49:23", - "http_etag": "\"a4c6a8d2eaef24b7661151836891c8284b39fb75\"", "is_server_owner": - false, "self_link": "http://localhost:9001/3.0/users/16", "user_id": 16}, - {"created_on": "2005-08-01T07:49:23", "http_etag": "\"5ba84a9331a86066b367c0388a143ff681442612\"", - "is_server_owner": false, "self_link": "http://localhost:9001/3.0/users/17", - "user_id": 17}], "http_etag": "\"bb8f89796980aa1389a1de16aa1f7aaf93fcc290\"", + "http_etag": "\"c7360c029a83c97672ca38dd8b008d48e05949a6\"", "is_server_owner": + false, "self_link": "http://localhost:9001/3.0/users/7", "user_id": 7}, {"created_on": + "2005-08-01T07:49:23", "http_etag": "\"9f85bec9adf1f795257120c028ebcd42df491bcb\"", + "is_server_owner": false, "self_link": "http://localhost:9001/3.0/users/8", + "user_id": 8}], "http_etag": "\"6d79d8839102712f649497295042532321f7a937\"", "start": 0, "total_size": 2}'} headers: - content-length: ['487'] - content-type: [application/json; charset=utf-8] + content-length: ['483'] + 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/users/16 + uri: http://localhost:9001/3.0/users/7 response: body: {string: !!python/unicode ''} headers: @@ -204,7 +208,7 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode DELETE - uri: http://localhost:9001/3.0/users/17 + uri: http://localhost:9001/3.0/users/8 response: body: {string: !!python/unicode ''} headers: diff --git a/src/postorius/tests/fixtures/vcr_cassettes/ListMembersAccessTest.test_page_not_accessible_if_not_logged_in.yaml b/src/postorius/tests/fixtures/vcr_cassettes/ListMembersAccessTest.test_page_not_accessible_if_not_logged_in.yaml index e4eb536..d7ba4ea 100644 --- a/src/postorius/tests/fixtures/vcr_cassettes/ListMembersAccessTest.test_page_not_accessible_if_not_logged_in.yaml +++ b/src/postorius/tests/fixtures/vcr_cassettes/ListMembersAccessTest.test_page_not_accessible_if_not_logged_in.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=owner%40example.com @@ -66,7 +68,8 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - location: ['http://localhost:9001/3.0/members/17'] + content-type: [application/json; charset=UTF-8] + location: ['http://localhost:9001/3.0/members/9'] status: {code: 201, message: Created} - request: body: list_id=foo.example.com&role=moderator&subscriber=moderator%40example.com @@ -79,7 +82,8 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - location: ['http://localhost:9001/3.0/members/18'] + content-type: [application/json; charset=UTF-8] + location: ['http://localhost:9001/3.0/members/10'] status: {code: 201, message: Created} - request: body: null @@ -95,7 +99,7 @@ "start": 0, "total_size": 1}'} headers: content-length: ['338'] - content-type: [application/json; charset=utf-8] + content-type: [application/json; charset=UTF-8] status: {code: 200, message: OK} - request: body: null @@ -116,22 +120,22 @@ uri: http://localhost:9001/3.0/users response: body: {string: !!python/unicode '{"entries": [{"created_on": "2005-08-01T07:49:23", - "http_etag": "\"9e9ec0bee5e8d3005e3e51a29a0f628cf28f7db0\"", "is_server_owner": - false, "self_link": "http://localhost:9001/3.0/users/18", "user_id": 18}, - {"created_on": "2005-08-01T07:49:23", "http_etag": "\"f01a45c6984d9e4639cb6d338286307c11624e4f\"", - "is_server_owner": false, "self_link": "http://localhost:9001/3.0/users/19", - "user_id": 19}], "http_etag": "\"49080d1156311c719cfea1ed55245042659b4d88\"", + "http_etag": "\"d3653a82ed2e228300cde355e9d15020657bfb86\"", "is_server_owner": + false, "self_link": "http://localhost:9001/3.0/users/9", "user_id": 9}, {"created_on": + "2005-08-01T07:49:23", "http_etag": "\"40c88498622198c212181e9ff106e60a3cba46ed\"", + "is_server_owner": false, "self_link": "http://localhost:9001/3.0/users/10", + "user_id": 10}], "http_etag": "\"932fe2d6b99ecd15c16ca34c98d760ed33d42bea\"", "start": 0, "total_size": 2}'} headers: - content-length: ['487'] - content-type: [application/json; charset=utf-8] + content-length: ['485'] + 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/users/18 + uri: http://localhost:9001/3.0/users/10 response: body: {string: !!python/unicode ''} headers: @@ -142,7 +146,7 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode DELETE - uri: http://localhost:9001/3.0/users/19 + uri: http://localhost:9001/3.0/users/9 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 34c3ba9..a754d79 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 @@ -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: display_name=None&list_id=foo.example.com&pre_approved=True&pre_confirmed=True&pre_verified=True&subscriber=member-1%40example.com @@ -66,7 +68,8 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - location: ['http://localhost:9001/3.0/members/19'] + content-type: [application/json; charset=UTF-8] + 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 @@ -79,7 +82,8 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - location: ['http://localhost:9001/3.0/members/20'] + content-type: [application/json; charset=UTF-8] + location: ['http://localhost:9001/3.0/members/12'] status: {code: 201, message: Created} - request: body: null @@ -91,7 +95,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 @@ -106,7 +110,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 @@ -117,13 +121,13 @@ 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": - "\"a908971164f8c4bd764c721a72b133fb55fc7b54\"", "list_id": "foo.example.com", - "member_id": 19, "role": "member", "self_link": "http://localhost:9001/3.0/members/19", - "user": "http://localhost:9001/3.0/users/20"}], "http_etag": "\"d2b02fc7653fe98117112aa0930e6ab7ba79b668\"", + "\"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\"", "start": 0, "total_size": 2}'} headers: content-length: ['462'] - content-type: [application/json; charset=utf-8] + content-type: [application/json; charset=UTF-8] status: {code: 200, message: OK} - request: body: null @@ -134,49 +138,70 @@ 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": - "\"a908971164f8c4bd764c721a72b133fb55fc7b54\"", "list_id": "foo.example.com", - "member_id": 19, "role": "member", "self_link": "http://localhost:9001/3.0/members/19", - "user": "http://localhost:9001/3.0/users/20"}, {"address": "http://localhost:9001/3.0/addresses/member-2@example.com", + "\"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": - "\"380f7fa83cf0235ede77da543c208399c5845f11\"", "list_id": "foo.example.com", - "member_id": 20, "role": "member", "self_link": "http://localhost:9001/3.0/members/20", - "user": "http://localhost:9001/3.0/users/21"}], "http_etag": "\"02207053ca07a3167be52b09e0a360a4b59a2247\"", + "\"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] + 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/19 + 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 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": - "\"a908971164f8c4bd764c721a72b133fb55fc7b54\"", "list_id": "foo.example.com", - "member_id": 19, "role": "member", "self_link": "http://localhost:9001/3.0/members/19", - "user": "http://localhost:9001/3.0/users/20"}'} + "\"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"}'} headers: content-length: ['357'] - 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/members/20 + 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": - "\"380f7fa83cf0235ede77da543c208399c5845f11\"", "list_id": "foo.example.com", - "member_id": 20, "role": "member", "self_link": "http://localhost:9001/3.0/members/20", - "user": "http://localhost:9001/3.0/users/21"}'} + "\"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"}'} headers: content-length: ['357'] - content-type: [application/json; charset=utf-8] + content-type: [application/json; charset=UTF-8] status: {code: 200, message: OK} - request: body: null @@ -188,7 +213,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 @@ -203,7 +228,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 @@ -214,13 +239,13 @@ 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": - "\"a908971164f8c4bd764c721a72b133fb55fc7b54\"", "list_id": "foo.example.com", - "member_id": 19, "role": "member", "self_link": "http://localhost:9001/3.0/members/19", - "user": "http://localhost:9001/3.0/users/20"}], "http_etag": "\"a7d728d43b7c2f10eb0e5eb5e219657b9a5dec32\"", + "\"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\"", "start": 0, "total_size": 1}'} headers: content-length: ['462'] - content-type: [application/json; charset=utf-8] + content-type: [application/json; charset=UTF-8] status: {code: 200, message: OK} - request: body: null @@ -231,13 +256,196 @@ 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": - "\"a908971164f8c4bd764c721a72b133fb55fc7b54\"", "list_id": "foo.example.com", - "member_id": 19, "role": "member", "self_link": "http://localhost:9001/3.0/members/19", - "user": "http://localhost:9001/3.0/users/20"}], "http_etag": "\"a7d728d43b7c2f10eb0e5eb5e219657b9a5dec32\"", + "\"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\"", "start": 0, "total_size": 1}'} headers: content-length: ['462'] - 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/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/users/su@example.com + response: + body: {string: !!python/unicode 404 Not Found} + headers: + content-length: ['13'] + content-type: [application/json; charset=UTF-8] + status: {code: 404, message: Not Found} +- 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": "\"4d9bc85dd33a55faefff3ccbbf04ab14a6889a98\"", "list_id": "foo.example.com", + "list_name": "foo", "mail_host": "example.com", "member_count": 2, "self_link": + "http://localhost:9001/3.0/lists/foo.example.com", "volume": 1}'} + headers: + content-length: ['294'] + 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/find?count=1&list_id=foo.example.com&page=1&role=member&subscriber=%2Anot_a_member%2A + 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 GET + uri: http://localhost:9001/3.0/members/find?count=25&list_id=foo.example.com&page=1&role=member&subscriber=%2Anot_a_member%2A + 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 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: + body: {string: !!python/unicode ''} + headers: + content-length: ['0'] + status: {code: 204, message: No Content} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + method: !!python/unicode DELETE + uri: http://localhost:9001/3.0/lists/foo.example.com/member/member-2@example.com + response: + body: {string: !!python/unicode ''} + headers: + content-length: ['0'] + status: {code: 204, message: No Content} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + method: !!python/unicode GET + uri: http://localhost:9001/3.0/users/su@example.com + response: + body: {string: !!python/unicode 404 Not Found} + headers: + content-length: ['13'] + content-type: [application/json; charset=UTF-8] + status: {code: 404, message: Not Found} +- 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] + status: {code: 200, message: OK} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + method: !!python/unicode GET + uri: http://localhost:9001/3.0/members/find?count=1&list_id=foo.example.com&page=1&role=member&subscriber=%2Amember-1%2A + 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 GET + uri: http://localhost:9001/3.0/members/find?count=25&list_id=foo.example.com&page=1&role=member&subscriber=%2Amember-1%2A + 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 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 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 ac82de4..7938d97 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 @@ -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: display_name=None&list_id=foo.example.com&pre_approved=True&pre_confirmed=True&pre_verified=True&subscriber=member-1%40example.com @@ -66,7 +68,8 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - location: ['http://localhost:9001/3.0/members/21'] + content-type: [application/json; charset=UTF-8] + location: ['http://localhost:9001/3.0/members/13'] 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 @@ -79,7 +82,8 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - location: ['http://localhost:9001/3.0/members/22'] + content-type: [application/json; charset=UTF-8] + location: ['http://localhost:9001/3.0/members/14'] status: {code: 201, message: Created} - request: body: null @@ -91,7 +95,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 @@ -106,7 +110,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 @@ -117,13 +121,13 @@ 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": - "\"61467b740e44c42c8c27df70d993b02815ddcc9c\"", "list_id": "foo.example.com", - "member_id": 21, "role": "member", "self_link": "http://localhost:9001/3.0/members/21", - "user": "http://localhost:9001/3.0/users/20"}], "http_etag": "\"041d9f16598999737f85ece0796bd12594b1d0b2\"", + "\"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\"", "start": 0, "total_size": 2}'} headers: content-length: ['462'] - content-type: [application/json; charset=utf-8] + content-type: [application/json; charset=UTF-8] status: {code: 200, message: OK} - request: body: null @@ -134,49 +138,70 @@ 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": - "\"61467b740e44c42c8c27df70d993b02815ddcc9c\"", "list_id": "foo.example.com", - "member_id": 21, "role": "member", "self_link": "http://localhost:9001/3.0/members/21", - "user": "http://localhost:9001/3.0/users/20"}, {"address": "http://localhost:9001/3.0/addresses/member-2@example.com", + "\"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": - "\"7f36a6cbcab522b4af4eddf74d145209ee67744e\"", "list_id": "foo.example.com", - "member_id": 22, "role": "member", "self_link": "http://localhost:9001/3.0/members/22", - "user": "http://localhost:9001/3.0/users/21"}], "http_etag": "\"12a589a394ce3e18866243cb143a9bf5deeab62d\"", + "\"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] + 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/21 + 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 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": - "\"61467b740e44c42c8c27df70d993b02815ddcc9c\"", "list_id": "foo.example.com", - "member_id": 21, "role": "member", "self_link": "http://localhost:9001/3.0/members/21", - "user": "http://localhost:9001/3.0/users/20"}'} + "\"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"}'} headers: content-length: ['357'] - 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/members/22 + uri: http://localhost:9001/3.0/members/14 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": - "\"7f36a6cbcab522b4af4eddf74d145209ee67744e\"", "list_id": "foo.example.com", - "member_id": 22, "role": "member", "self_link": "http://localhost:9001/3.0/members/22", - "user": "http://localhost:9001/3.0/users/21"}'} + "\"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"}'} headers: content-length: ['357'] - content-type: [application/json; charset=utf-8] + content-type: [application/json; charset=UTF-8] status: {code: 200, message: OK} - request: body: null