diff --git a/src/postorius/tests/fixtures/vcr_cassettes/list_members_access.yaml b/src/postorius/tests/fixtures/vcr_cassettes/list_members_access.yaml index 803aba2..f1ed5e2 100644 --- a/src/postorius/tests/fixtures/vcr_cassettes/list_members_access.yaml +++ b/src/postorius/tests/fixtures/vcr_cassettes/list_members_access.yaml @@ -579,6 +579,22 @@ !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] !!python/unicode 'user-agent': [!!python/unicode 'GNU Mailman REST client v1.0.0'] method: !!python/unicode 'GET' + uri: http://localhost:9001/3.0/users/test@example.com + response: + body: {string: !!python/unicode '404 Not Found'} + headers: + content-length: ['13'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 11 Nov 2015 08:52:15 GMT'] + server: [WSGIServer/0.2 CPython/3.4.2] + status: {code: 404, message: Not Found} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] + !!python/unicode 'user-agent': [!!python/unicode 'GNU Mailman REST client v1.0.0'] + method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/foo.example.com/roster/owner response: body: {string: !!python/unicode '{"entries": [{"self_link": "http://localhost:9001/3.0/members/159620023615929456754306653256797611603", @@ -589,7 +605,7 @@ "regular", "email": "owner@example.com"}], "http_etag": "\"b9d5581015ee3a6a62d5a44b9f50829408a7301c\"", "total_size": 1, "start": 0}'} headers: - content-length: ['565'] + content-length: ['564'] content-type: [application/json; charset=utf-8] date: ['Wed, 11 Nov 2015 12:49:31 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] @@ -652,7 +668,7 @@ "regular", "email": "owner@example.com"}], "http_etag": "\"b9d5581015ee3a6a62d5a44b9f50829408a7301c\"", "total_size": 1, "start": 0}'} headers: - content-length: ['565'] + content-length: ['564'] content-type: [application/json; charset=utf-8] date: ['Wed, 11 Nov 2015 12:49:32 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] diff --git a/src/postorius/tests/fixtures/vcr_cassettes/list_members_page.yaml b/src/postorius/tests/fixtures/vcr_cassettes/list_members_page.yaml index c590bd8..6089760 100644 --- a/src/postorius/tests/fixtures/vcr_cassettes/list_members_page.yaml +++ b/src/postorius/tests/fixtures/vcr_cassettes/list_members_page.yaml @@ -42,19 +42,98 @@ !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] !!python/unicode 'user-agent': [!!python/unicode 'GNU Mailman REST client v1.0.0'] method: !!python/unicode 'GET' + uri: http://localhost:9001/3.0/users/moderator@example.com + response: + body: {string: !!python/unicode '{"http_etag": "\"eb9cd59b8fb9ea633982ab974670ec1be0402607\"", + "self_link": "http://localhost:9001/3.0/users/94704940159445895320083756410847799181", + "is_server_owner": false, "user_id": 94704940159445895320083756410847799181, + "created_on": "2015-11-11T08:52:08.898514"}'} + headers: + content-length: ['269'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 11 Nov 2015 08:52:09 GMT'] + server: [WSGIServer/0.2 CPython/3.4.2] + status: {code: 200, message: OK} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] + !!python/unicode 'user-agent': [!!python/unicode 'GNU Mailman REST client v1.0.0'] + method: !!python/unicode 'GET' + uri: http://localhost:9001/3.0/users/94704940159445895320083756410847799181 + response: + body: {string: !!python/unicode '{"http_etag": "\"eb9cd59b8fb9ea633982ab974670ec1be0402607\"", + "self_link": "http://localhost:9001/3.0/users/94704940159445895320083756410847799181", + "is_server_owner": false, "user_id": 94704940159445895320083756410847799181, + "created_on": "2015-11-11T08:52:08.898514"}'} + headers: + content-length: ['269'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 11 Nov 2015 08:52:09 GMT'] + server: [WSGIServer/0.2 CPython/3.4.2] + status: {code: 200, message: OK} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] + !!python/unicode 'user-agent': [!!python/unicode 'GNU Mailman REST client v1.0.0'] + method: !!python/unicode 'GET' + uri: http://localhost:9001/3.0/users/94704940159445895320083756410847799181/addresses + response: + body: {string: !!python/unicode '{"total_size": 1, "entries": [{"original_email": + "moderator@example.com", "user": "http://localhost:9001/3.0/users/94704940159445895320083756410847799181", + "http_etag": "\"9a96cbe5ba5df8c76cb87cbc948d261d02565192\"", "self_link": + "http://localhost:9001/3.0/addresses/moderator@example.com", "registered_on": + "2015-11-11T08:52:08.869116", "email": "moderator@example.com"}], "http_etag": + "\"a86a44aaf86663deff50f2972891636e82db9ecd\"", "start": 0}'} + headers: + content-length: ['446'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 11 Nov 2015 08:52:09 GMT'] + server: [WSGIServer/0.2 CPython/3.4.2] + status: {code: 200, message: OK} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] + !!python/unicode 'user-agent': [!!python/unicode 'GNU Mailman REST client v1.0.0'] + method: !!python/unicode 'GET' + uri: http://localhost:9001/3.0/addresses/moderator@example.com + response: + body: {string: !!python/unicode '{"original_email": "moderator@example.com", "user": + "http://localhost:9001/3.0/users/94704940159445895320083756410847799181", + "http_etag": "\"9a96cbe5ba5df8c76cb87cbc948d261d02565192\"", "self_link": + "http://localhost:9001/3.0/addresses/moderator@example.com", "registered_on": + "2015-11-11T08:52:08.869116", "email": "moderator@example.com"}'} + headers: + content-length: ['341'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 11 Nov 2015 08:52:09 GMT'] + server: [WSGIServer/0.2 CPython/3.4.2] + status: {code: 200, message: OK} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] + !!python/unicode 'user-agent': [!!python/unicode 'GNU Mailman REST client v1.0.0'] + method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/foo.example.com/roster/owner response: - body: {string: !!python/unicode '{"entries": [{"self_link": "http://localhost:9001/3.0/members/261891266690910004584167411574025850636", + body: {string: !!python/unicode '{"total_size": 1, "entries": [{"member_id": 261891266690910004584167411574025850636, + "address": "http://localhost:9001/3.0/addresses/owner@example.com", "list_id": + "foo.example.com", "http_etag": "\"ce0fdcf05dd4930cee008fe8157bbf59643748a6\"", "user": "http://localhost:9001/3.0/users/94218210250211962065145319561376051884", - "http_etag": "\"92d38feca8af044bc45d2b8f68d3e37ed4431cc8\"", "list_id": "foo.example.com", - "address": "http://localhost:9001/3.0/addresses/owner@example.com", "role": - "owner", "member_id": 261891266690910004584167411574025850636, "delivery_mode": - "regular", "email": "owner@example.com"}], "http_etag": "\"9183ae6d24ff423877969f8a2470de8d81948d92\"", - "total_size": 1, "start": 0}'} + "email": "owner@example.com", "role": "owner", "self_link": "http://localhost:9001/3.0/members/261891266690910004584167411574025850636", + "delivery_mode": "regular"}], "http_etag": "\"e1588957a20c78be1fcd3fd6235890ed1dab4e37\"", + "start": 0}'} headers: - content-length: ['565'] + content-length: ['564'] content-type: [application/json; charset=utf-8] - date: ['Wed, 11 Nov 2015 12:49:26 GMT'] + date: ['Wed, 11 Nov 2015 08:52:09 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -148,12 +227,90 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/foo@example.com/roster/member?count=25&page=1 response: - body: {string: !!python/unicode '{"http_etag": "\"32223434a0f3af4cdc4673d1fbc5bac1f6d98fd3\"", - "total_size": 0, "start": 0}'} + body: {string: !!python/unicode '{"total_size": 0, "http_etag": "\"32223434a0f3af4cdc4673d1fbc5bac1f6d98fd3\"", + "start": 0}'} headers: content-length: ['90'] content-type: [application/json; charset=utf-8] - date: ['Wed, 11 Nov 2015 12:49:28 GMT'] + date: ['Wed, 11 Nov 2015 08:52:10 GMT'] + server: [WSGIServer/0.2 CPython/3.4.2] + status: {code: 200, message: OK} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] + !!python/unicode 'user-agent': [!!python/unicode 'GNU Mailman REST client v1.0.0'] + method: !!python/unicode 'GET' + uri: http://localhost:9001/3.0/users/owner@example.com + response: + body: {string: !!python/unicode '{"http_etag": "\"8592c09f671a685907e05a62a28bb0096fa9d998\"", + "self_link": "http://localhost:9001/3.0/users/94218210250211962065145319561376051884", + "is_server_owner": false, "user_id": 94218210250211962065145319561376051884, + "created_on": "2015-11-11T08:52:08.703105"}'} + headers: + content-length: ['267'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 11 Nov 2015 08:52:10 GMT'] + server: [WSGIServer/0.2 CPython/3.4.2] + status: {code: 200, message: OK} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] + !!python/unicode 'user-agent': [!!python/unicode 'GNU Mailman REST client v1.0.0'] + method: !!python/unicode 'GET' + uri: http://localhost:9001/3.0/users/94218210250211962065145319561376051884 + response: + body: {string: !!python/unicode '{"http_etag": "\"8592c09f671a685907e05a62a28bb0096fa9d998\"", + "self_link": "http://localhost:9001/3.0/users/94218210250211962065145319561376051884", + "is_server_owner": false, "user_id": 94218210250211962065145319561376051884, + "created_on": "2015-11-11T08:52:08.703105"}'} + headers: + content-length: ['267'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 11 Nov 2015 08:52:10 GMT'] + server: [WSGIServer/0.2 CPython/3.4.2] + status: {code: 200, message: OK} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] + !!python/unicode 'user-agent': [!!python/unicode 'GNU Mailman REST client v1.0.0'] + method: !!python/unicode 'GET' + uri: http://localhost:9001/3.0/users/94218210250211962065145319561376051884/addresses + response: + body: {string: !!python/unicode '{"total_size": 1, "entries": [{"original_email": + "owner@example.com", "user": "http://localhost:9001/3.0/users/94218210250211962065145319561376051884", + "http_etag": "\"b5f13df8b7fd88ff94dc60ab2e400c113e630769\"", "self_link": + "http://localhost:9001/3.0/addresses/owner@example.com", "registered_on": + "2015-11-11T08:52:08.674385", "email": "owner@example.com"}], "http_etag": + "\"9e11e7259297a9dd08c71e3e984ccb5f23524673\"", "start": 0}'} + headers: + content-length: ['433'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 11 Nov 2015 08:52:10 GMT'] + server: [WSGIServer/0.2 CPython/3.4.2] + status: {code: 200, message: OK} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] + !!python/unicode 'user-agent': [!!python/unicode 'GNU Mailman REST client v1.0.0'] + method: !!python/unicode 'GET' + uri: http://localhost:9001/3.0/addresses/owner@example.com + response: + body: {string: !!python/unicode '{"original_email": "owner@example.com", "user": + "http://localhost:9001/3.0/users/94218210250211962065145319561376051884", "http_etag": + "\"b5f13df8b7fd88ff94dc60ab2e400c113e630769\"", "self_link": "http://localhost:9001/3.0/addresses/owner@example.com", + "registered_on": "2015-11-11T08:52:08.674385", "email": "owner@example.com"}'} + headers: + content-length: ['328'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 11 Nov 2015 08:52:10 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -207,6 +364,47 @@ !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] !!python/unicode 'user-agent': [!!python/unicode 'GNU Mailman REST client v1.0.0'] method: !!python/unicode 'GET' + uri: http://localhost:9001/3.0/lists/foo@example.com + response: + body: {string: !!python/unicode '{"list_id": "foo.example.com", "mail_host": "example.com", + "volume": 1, "self_link": "http://localhost:9001/3.0/lists/foo.example.com", + "display_name": "Foo", "http_etag": "\"698a819bbb6b902096a8c5543cc7fac2328960d5\"", + "fqdn_listname": "foo@example.com", "member_count": 0, "list_name": "foo"}'} + headers: + content-length: ['294'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 11 Nov 2015 08:52:10 GMT'] + server: [WSGIServer/0.2 CPython/3.4.2] + status: {code: 200, message: OK} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] + !!python/unicode 'user-agent': [!!python/unicode 'GNU Mailman REST client v1.0.0'] + method: !!python/unicode 'GET' + uri: http://localhost:9001/3.0/lists/foo.example.com/roster/owner + response: + body: {string: !!python/unicode '{"total_size": 1, "entries": [{"member_id": 243692671647427957757469737170312906392, + "address": "http://localhost:9001/3.0/addresses/owner@example.com", "list_id": + "foo.example.com", "http_etag": "\"b2ed02fece44ad60e9b7c12ff65a29c8f38c1d6c\"", + "user": "http://localhost:9001/3.0/users/94218210250211962065145319561376051884", + "email": "owner@example.com", "role": "owner", "self_link": "http://localhost:9001/3.0/members/243692671647427957757469737170312906392", + "delivery_mode": "regular"}], "http_etag": "\"e51be9822b60b0bd96ccbfd420bd8ab90a0474f3\"", + "start": 0}'} + headers: + content-length: ['564'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 11 Nov 2015 08:52:10 GMT'] + server: [WSGIServer/0.2 CPython/3.4.2] + status: {code: 200, message: OK} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] + !!python/unicode 'user-agent': [!!python/unicode 'GNU Mailman REST client v1.0.0'] + method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/foo.example.com/roster/owner response: body: {string: !!python/unicode '{"entries": [{"self_link": "http://localhost:9001/3.0/members/243692671647427957757469737170312906392", @@ -287,6 +485,22 @@ !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] !!python/unicode 'user-agent': [!!python/unicode 'GNU Mailman REST client v1.0.0'] 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] + date: ['Wed, 11 Nov 2015 08:52:12 GMT'] + server: [WSGIServer/0.2 CPython/3.4.2] + status: {code: 404, message: Not Found} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] + !!python/unicode 'user-agent': [!!python/unicode 'GNU Mailman REST client v1.0.0'] + method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/foo.example.com/roster/owner response: body: {string: !!python/unicode '{"entries": [{"self_link": "http://localhost:9001/3.0/members/15130748568807809724288298666046815183", diff --git a/src/postorius/tests/fixtures/vcr_cassettes/test_change_subscription-2.yaml b/src/postorius/tests/fixtures/vcr_cassettes/test_change_subscription-2.yaml index 98c9183..b9149ba 100644 --- a/src/postorius/tests/fixtures/vcr_cassettes/test_change_subscription-2.yaml +++ b/src/postorius/tests/fixtures/vcr_cassettes/test_change_subscription-2.yaml @@ -78,6 +78,21 @@ accept-encoding: ['gzip, deflate'] !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] !!python/unicode 'user-agent': [!!python/unicode 'GNU Mailman REST client v1.0.0'] + method: !!python/unicode 'POST' + uri: http://localhost:9001/3.0/addresses/anotheremail@example.com/verify + response: + body: {string: !!python/unicode ''} + headers: + content-length: ['0'] + date: ['Wed, 11 Nov 2015 08:52:30 GMT'] + server: [WSGIServer/0.2 CPython/3.4.2] + status: {code: 204, message: No Content} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] + !!python/unicode 'user-agent': [!!python/unicode 'GNU Mailman REST client v1.0.0'] method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/foo@example.com response: @@ -98,50 +113,15 @@ !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] !!python/unicode 'user-agent': [!!python/unicode 'GNU Mailman REST client v1.0.0'] method: !!python/unicode 'GET' - uri: http://localhost:9001/3.0/lists/foo.example.com/roster/owner - response: - body: {string: !!python/unicode '{"http_etag": "\"32223434a0f3af4cdc4673d1fbc5bac1f6d98fd3\"", - "total_size": 0, "start": 0}'} - headers: - content-length: ['90'] - content-type: [application/json; charset=utf-8] - date: ['Wed, 11 Nov 2015 12:49:46 GMT'] - server: [WSGIServer/0.2 CPython/3.4.2] - status: {code: 200, message: OK} -- request: - body: null - headers: - accept-encoding: ['gzip, deflate'] - !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] - !!python/unicode 'user-agent': [!!python/unicode 'GNU Mailman REST client v1.0.0'] - method: !!python/unicode 'GET' - uri: http://localhost:9001/3.0/lists/foo.example.com/roster/moderator - response: - body: {string: !!python/unicode '{"http_etag": "\"32223434a0f3af4cdc4673d1fbc5bac1f6d98fd3\"", - "total_size": 0, "start": 0}'} - headers: - content-length: ['90'] - content-type: [application/json; charset=utf-8] - date: ['Wed, 11 Nov 2015 12:49:46 GMT'] - server: [WSGIServer/0.2 CPython/3.4.2] - status: {code: 200, message: OK} -- request: - body: null - headers: - accept-encoding: ['gzip, deflate'] - !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] - !!python/unicode 'user-agent': [!!python/unicode 'GNU Mailman REST client v1.0.0'] - method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/users/test@example.com response: - body: {string: !!python/unicode '{"http_etag": "\"37b41a08d3ada12388d91b9b9bc153f05b3ff730\"", - "is_server_owner": false, "user_id": 175101733981884185786040725666736952966, - "display_name": "None", "self_link": "http://localhost:9001/3.0/users/175101733981884185786040725666736952966", - "created_on": "2015-11-11T12:49:46.231219"}'} + body: {string: !!python/unicode '{"is_server_owner": false, "http_etag": "\"46c89e4c192af91458b3bc8ca8efd3199d39672e\"", + "user_id": 175101733981884185786040725666736952966, "self_link": "http://localhost:9001/3.0/users/175101733981884185786040725666736952966", + "display_name": "None", "created_on": "2015-11-11T08:52:29.896503"}'} headers: content-length: ['295'] content-type: [application/json; charset=utf-8] - date: ['Wed, 11 Nov 2015 12:49:46 GMT'] + date: ['Wed, 11 Nov 2015 08:52:30 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -153,14 +133,13 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/users/175101733981884185786040725666736952966 response: - body: {string: !!python/unicode '{"http_etag": "\"37b41a08d3ada12388d91b9b9bc153f05b3ff730\"", - "is_server_owner": false, "user_id": 175101733981884185786040725666736952966, - "display_name": "None", "self_link": "http://localhost:9001/3.0/users/175101733981884185786040725666736952966", - "created_on": "2015-11-11T12:49:46.231219"}'} + body: {string: !!python/unicode '{"is_server_owner": false, "http_etag": "\"46c89e4c192af91458b3bc8ca8efd3199d39672e\"", + "user_id": 175101733981884185786040725666736952966, "self_link": "http://localhost:9001/3.0/users/175101733981884185786040725666736952966", + "display_name": "None", "created_on": "2015-11-11T08:52:29.896503"}'} headers: content-length: ['295'] content-type: [application/json; charset=utf-8] - date: ['Wed, 11 Nov 2015 12:49:46 GMT'] + date: ['Wed, 11 Nov 2015 08:52:30 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -172,21 +151,21 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/users/175101733981884185786040725666736952966/addresses response: - body: {string: !!python/unicode '{"entries": [{"email": "anotheremail@example.com", + body: {string: !!python/unicode '{"total_size": 2, "entries": [{"verified_on": + "2015-11-11T08:52:30.262179", "original_email": "anotheremail@example.com", "user": "http://localhost:9001/3.0/users/175101733981884185786040725666736952966", - "http_etag": "\"f426bc970d106dbe0b97a94d2a1cb7d4841c7426\"", "self_link": + "http_etag": "\"81c4cd219f97c86934e5fcdb7804c920e891bcc8\"", "self_link": "http://localhost:9001/3.0/addresses/anotheremail@example.com", "registered_on": - "2015-11-11T12:49:46.474206", "original_email": "anotheremail@example.com"}, - {"email": "test@example.com", "user": "http://localhost:9001/3.0/users/175101733981884185786040725666736952966", - "display_name": "None", "http_etag": "\"ff99ece0c664fbdc7c31e598be6fff735098d6e8\"", - "self_link": "http://localhost:9001/3.0/addresses/test@example.com", "registered_on": - "2015-11-11T12:49:46.213354", "original_email": "test@example.com"}], "http_etag": - "\"f2c8e9b9e18b8429f7f55962f7ec73bd670fb7f4\"", "total_size": 2, "start": - 0}'} + "2015-11-11T08:52:30.155031", "email": "anotheremail@example.com"}, {"original_email": + "test@example.com", "user": "http://localhost:9001/3.0/users/175101733981884185786040725666736952966", + "http_etag": "\"dbf31067cb3a34f66b4b7e99d58e8e714923dcba\"", "registered_on": + "2015-11-11T08:52:29.878035", "self_link": "http://localhost:9001/3.0/addresses/test@example.com", + "display_name": "None", "email": "test@example.com"}], "http_etag": "\"6cd8190baf5403ef8476c864d712db23cafc3bd2\"", + "start": 0}'} headers: - content-length: ['809'] + content-length: ['854'] content-type: [application/json; charset=utf-8] - date: ['Wed, 11 Nov 2015 12:49:46 GMT'] + date: ['Wed, 11 Nov 2015 08:52:30 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -196,15 +175,73 @@ !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] !!python/unicode 'user-agent': [!!python/unicode 'GNU Mailman REST client v1.0.0'] method: !!python/unicode 'GET' - uri: http://localhost:9001/3.0/lists/foo.example.com/member/anotheremail@example.com + uri: http://localhost:9001/3.0/addresses/anotheremail@example.com response: - body: {string: !!python/unicode '{}'} + body: {string: !!python/unicode '{"verified_on": "2015-11-11T08:52:30.262179", + "original_email": "anotheremail@example.com", "user": "http://localhost:9001/3.0/users/175101733981884185786040725666736952966", + "http_etag": "\"81c4cd219f97c86934e5fcdb7804c920e891bcc8\"", "self_link": + "http://localhost:9001/3.0/addresses/anotheremail@example.com", "registered_on": + "2015-11-11T08:52:30.155031", "email": "anotheremail@example.com"}'} headers: - content-length: ['2'] - content-type: [application/json] - date: ['Wed, 11 Nov 2015 12:49:46 GMT'] + content-length: ['396'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 11 Nov 2015 08:52:30 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] - status: {code: 404, message: Not Found} + status: {code: 200, message: OK} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] + !!python/unicode 'user-agent': [!!python/unicode 'GNU Mailman REST client v1.0.0'] + method: !!python/unicode 'GET' + uri: http://localhost:9001/3.0/addresses/test@example.com + response: + body: {string: !!python/unicode '{"original_email": "test@example.com", "user": + "http://localhost:9001/3.0/users/175101733981884185786040725666736952966", + "http_etag": "\"dbf31067cb3a34f66b4b7e99d58e8e714923dcba\"", "registered_on": + "2015-11-11T08:52:29.878035", "self_link": "http://localhost:9001/3.0/addresses/test@example.com", + "display_name": "None", "email": "test@example.com"}'} + headers: + content-length: ['351'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 11 Nov 2015 08:52:30 GMT'] + server: [WSGIServer/0.2 CPython/3.4.2] + status: {code: 200, message: OK} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] + !!python/unicode 'user-agent': [!!python/unicode 'GNU Mailman REST client v1.0.0'] + method: !!python/unicode 'GET' + uri: http://localhost:9001/3.0/lists/foo.example.com/roster/owner + response: + body: {string: !!python/unicode '{"total_size": 0, "http_etag": "\"32223434a0f3af4cdc4673d1fbc5bac1f6d98fd3\"", + "start": 0}'} + headers: + content-length: ['90'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 11 Nov 2015 08:52:30 GMT'] + server: [WSGIServer/0.2 CPython/3.4.2] + status: {code: 200, message: OK} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] + !!python/unicode 'user-agent': [!!python/unicode 'GNU Mailman REST client v1.0.0'] + method: !!python/unicode 'GET' + uri: http://localhost:9001/3.0/lists/foo.example.com/roster/moderator + response: + body: {string: !!python/unicode '{"total_size": 0, "http_etag": "\"32223434a0f3af4cdc4673d1fbc5bac1f6d98fd3\"", + "start": 0}'} + headers: + content-length: ['90'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 11 Nov 2015 08:52:30 GMT'] + server: [WSGIServer/0.2 CPython/3.4.2] + status: {code: 200, message: OK} - request: body: null headers: @@ -218,7 +255,23 @@ headers: content-length: ['2'] content-type: [application/json] - date: ['Wed, 11 Nov 2015 12:49:46 GMT'] + date: ['Wed, 11 Nov 2015 08:52:30 GMT'] + server: [WSGIServer/0.2 CPython/3.4.2] + status: {code: 404, message: Not Found} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] + !!python/unicode 'user-agent': [!!python/unicode 'GNU Mailman REST client v1.0.0'] + method: !!python/unicode 'GET' + uri: http://localhost:9001/3.0/lists/foo.example.com/member/anotheremail@example.com + response: + body: {string: !!python/unicode '{}'} + headers: + content-length: ['2'] + content-type: [application/json] + date: ['Wed, 11 Nov 2015 08:52:30 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 404, message: Not Found} - request: diff --git a/src/postorius/tests/fixtures/vcr_cassettes/test_change_subscription.yaml b/src/postorius/tests/fixtures/vcr_cassettes/test_change_subscription.yaml index 12dfe26..b4e10c9 100644 --- a/src/postorius/tests/fixtures/vcr_cassettes/test_change_subscription.yaml +++ b/src/postorius/tests/fixtures/vcr_cassettes/test_change_subscription.yaml @@ -61,48 +61,13 @@ !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] !!python/unicode 'user-agent': [!!python/unicode 'GNU Mailman REST client v1.0.0'] method: !!python/unicode 'GET' - uri: http://localhost:9001/3.0/lists/foo.example.com/roster/owner - response: - body: {string: !!python/unicode '{"http_etag": "\"32223434a0f3af4cdc4673d1fbc5bac1f6d98fd3\"", - "total_size": 0, "start": 0}'} - headers: - content-length: ['90'] - content-type: [application/json; charset=utf-8] - date: ['Wed, 11 Nov 2015 12:49:40 GMT'] - server: [WSGIServer/0.2 CPython/3.4.2] - status: {code: 200, message: OK} -- request: - body: null - headers: - accept-encoding: ['gzip, deflate'] - !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] - !!python/unicode 'user-agent': [!!python/unicode 'GNU Mailman REST client v1.0.0'] - method: !!python/unicode 'GET' - uri: http://localhost:9001/3.0/lists/foo.example.com/roster/moderator - response: - body: {string: !!python/unicode '{"http_etag": "\"32223434a0f3af4cdc4673d1fbc5bac1f6d98fd3\"", - "total_size": 0, "start": 0}'} - headers: - content-length: ['90'] - content-type: [application/json; charset=utf-8] - date: ['Wed, 11 Nov 2015 12:49:40 GMT'] - server: [WSGIServer/0.2 CPython/3.4.2] - status: {code: 200, message: OK} -- request: - body: null - headers: - accept-encoding: ['gzip, deflate'] - !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] - !!python/unicode 'user-agent': [!!python/unicode 'GNU Mailman REST client v1.0.0'] - method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/users/test@example.com response: - body: {string: !!python/unicode '{"http_etag": "\"669fb9a8f3872c7848531cb1757446f1ee3ce2d7\"", - "is_server_owner": false, "user_id": 35258670270330606438959454694878423733, - "display_name": "None", "self_link": "http://localhost:9001/3.0/users/35258670270330606438959454694878423733", - "created_on": "2015-11-11T12:49:40.357464"}'} + body: {string: !!python/unicode '{"is_server_owner": false, "http_etag": "\"4e2f73e4586662ff5840f566c7b92ba8fa8f9f71\"", + "user_id": 35258670270330606438959454694878423733, "self_link": "http://localhost:9001/3.0/users/35258670270330606438959454694878423733", + "display_name": "None", "created_on": "2015-11-11T08:52:24.187222"}'} headers: - content-length: ['293'] + content-length: ['295'] content-type: [application/json; charset=utf-8] date: ['Wed, 11 Nov 2015 12:49:40 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] @@ -155,6 +120,60 @@ !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] !!python/unicode 'user-agent': [!!python/unicode 'GNU Mailman REST client v1.0.0'] method: !!python/unicode 'GET' + uri: http://localhost:9001/3.0/addresses/test@example.com + response: + body: {string: !!python/unicode '{"verified_on": "2015-11-11T08:52:24.211923", + "original_email": "test@example.com", "user": "http://localhost:9001/3.0/users/35258670270330606438959454694878423733", + "http_etag": "\"36ec1132bcb053f26e9ea61326ee7d785f7c03a6\"", "registered_on": + "2015-11-11T08:52:24.168984", "self_link": "http://localhost:9001/3.0/addresses/test@example.com", + "display_name": "None", "email": "test@example.com"}'} + headers: + content-length: ['396'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 11 Nov 2015 08:52:24 GMT'] + server: [WSGIServer/0.2 CPython/3.4.2] + status: {code: 200, message: OK} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] + !!python/unicode 'user-agent': [!!python/unicode 'GNU Mailman REST client v1.0.0'] + method: !!python/unicode 'GET' + uri: http://localhost:9001/3.0/lists/foo.example.com/roster/owner + response: + body: {string: !!python/unicode '{"total_size": 0, "http_etag": "\"32223434a0f3af4cdc4673d1fbc5bac1f6d98fd3\"", + "start": 0}'} + headers: + content-length: ['90'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 11 Nov 2015 08:52:24 GMT'] + server: [WSGIServer/0.2 CPython/3.4.2] + status: {code: 200, message: OK} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] + !!python/unicode 'user-agent': [!!python/unicode 'GNU Mailman REST client v1.0.0'] + method: !!python/unicode 'GET' + uri: http://localhost:9001/3.0/lists/foo.example.com/roster/moderator + response: + body: {string: !!python/unicode '{"total_size": 0, "http_etag": "\"32223434a0f3af4cdc4673d1fbc5bac1f6d98fd3\"", + "start": 0}'} + headers: + content-length: ['90'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 11 Nov 2015 08:52:24 GMT'] + server: [WSGIServer/0.2 CPython/3.4.2] + status: {code: 200, message: OK} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] + !!python/unicode 'user-agent': [!!python/unicode 'GNU Mailman REST client v1.0.0'] + method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/foo.example.com/member/test@example.com response: body: {string: !!python/unicode '{"self_link": "http://localhost:9001/3.0/members/30853255152563400446883130236676839375", diff --git a/src/postorius/tests/fixtures/vcr_cassettes/test_list_members_add_moderator.yaml b/src/postorius/tests/fixtures/vcr_cassettes/test_list_members_add_moderator.yaml index 07356f0..86106a7 100644 --- a/src/postorius/tests/fixtures/vcr_cassettes/test_list_members_add_moderator.yaml +++ b/src/postorius/tests/fixtures/vcr_cassettes/test_list_members_add_moderator.yaml @@ -112,6 +112,22 @@ !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] !!python/unicode 'user-agent': [!!python/unicode 'GNU Mailman REST client v1.0.0'] 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] + date: ['Wed, 11 Nov 2015 08:52:06 GMT'] + server: [WSGIServer/0.2 CPython/3.4.2] + status: {code: 404, message: Not Found} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] + !!python/unicode 'user-agent': [!!python/unicode 'GNU Mailman REST client v1.0.0'] + method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/foo.example.com/roster/owner response: body: {string: !!python/unicode '{"http_etag": "\"32223434a0f3af4cdc4673d1fbc5bac1f6d98fd3\"", diff --git a/src/postorius/tests/fixtures/vcr_cassettes/test_list_members_add_owner.yaml b/src/postorius/tests/fixtures/vcr_cassettes/test_list_members_add_owner.yaml index bac6bdd..01c1b29 100644 --- a/src/postorius/tests/fixtures/vcr_cassettes/test_list_members_add_owner.yaml +++ b/src/postorius/tests/fixtures/vcr_cassettes/test_list_members_add_owner.yaml @@ -112,6 +112,22 @@ !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] !!python/unicode 'user-agent': [!!python/unicode 'GNU Mailman REST client v1.0.0'] 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] + date: ['Wed, 11 Nov 2015 08:52:07 GMT'] + server: [WSGIServer/0.2 CPython/3.4.2] + status: {code: 404, message: Not Found} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] + !!python/unicode 'user-agent': [!!python/unicode 'GNU Mailman REST client v1.0.0'] + method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/foo.example.com/roster/owner response: body: {string: !!python/unicode '{"http_etag": "\"32223434a0f3af4cdc4673d1fbc5bac1f6d98fd3\"", diff --git a/src/postorius/tests/fixtures/vcr_cassettes/test_list_members_new_moderator_added.yaml b/src/postorius/tests/fixtures/vcr_cassettes/test_list_members_new_moderator_added.yaml index 78aa6ab..901a9b5 100644 --- a/src/postorius/tests/fixtures/vcr_cassettes/test_list_members_new_moderator_added.yaml +++ b/src/postorius/tests/fixtures/vcr_cassettes/test_list_members_new_moderator_added.yaml @@ -16,7 +16,7 @@ "regular", "email": "newmod@example.com"}], "http_etag": "\"5f5ad3923b356fa84c7977f8be4b828c16e9d40a\"", "total_size": 1, "start": 0}'} headers: - content-length: ['572'] + content-length: ['569'] content-type: [application/json; charset=utf-8] date: ['Wed, 11 Nov 2015 12:49:24 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] diff --git a/src/postorius/tests/fixtures/vcr_cassettes/test_list_metrics.yaml b/src/postorius/tests/fixtures/vcr_cassettes/test_list_metrics.yaml index 2b63f3e..18bd031 100644 --- a/src/postorius/tests/fixtures/vcr_cassettes/test_list_metrics.yaml +++ b/src/postorius/tests/fixtures/vcr_cassettes/test_list_metrics.yaml @@ -96,6 +96,22 @@ !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] !!python/unicode 'user-agent': [!!python/unicode 'GNU Mailman REST client v1.0.0'] 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] + date: ['Wed, 11 Nov 2015 12:49:38 GMT'] + server: [WSGIServer/0.2 CPython/3.4.2] + status: {code: 404, message: Not Found} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] + !!python/unicode 'user-agent': [!!python/unicode 'GNU Mailman REST client v1.0.0'] + method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/test.example.org/roster/owner response: body: {string: !!python/unicode '{"http_etag": "\"32223434a0f3af4cdc4673d1fbc5bac1f6d98fd3\"", @@ -115,12 +131,12 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/test.example.org/roster/moderator response: - body: {string: !!python/unicode '{"http_etag": "\"32223434a0f3af4cdc4673d1fbc5bac1f6d98fd3\"", - "total_size": 0, "start": 0}'} + body: {string: !!python/unicode '{"total_size": 0, "http_etag": "\"32223434a0f3af4cdc4673d1fbc5bac1f6d98fd3\"", + "start": 0}'} headers: content-length: ['90'] content-type: [application/json; charset=utf-8] - date: ['Wed, 11 Nov 2015 12:49:38 GMT'] + date: ['Wed, 11 Nov 2015 08:52:22 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -132,31 +148,30 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/test@example.org/config response: - body: {string: !!python/unicode '{"autoresponse_grace_period": "90d", "autorespond_requests": - "none", "display_name": "Test", "default_member_action": "defer", "no_reply_address": - "noreply@example.org", "autorespond_postings": "none", "admin_notify_mchanges": - false, "fqdn_listname": "test@example.org", "autoresponse_postings_text": - "", "advertised": true, "description": "", "reply_goes_to_list": "no_munging", - "post_id": 1, "filter_content": false, "last_post_at": null, "next_digest_number": - 1, "autoresponse_owner_text": "", "acceptable_aliases": [], "administrivia": - true, "collapse_alternatives": true, "owner_address": "test-owner@example.org", - "welcome_message_uri": "mailman:///welcome.txt", "allow_list_posts": true, - "subscription_policy": "confirm", "list_name": "test", "admin_immed_notify": - true, "leave_address": "test-leave@example.org", "autoresponse_request_text": - "", "posting_pipeline": "default-posting-pipeline", "convert_html_to_plaintext": - false, "reply_to_address": "", "request_address": "test-request@example.org", - "join_address": "test-join@example.org", "send_welcome_message": true, "archive_policy": - "public", "volume": 1, "first_strip_reply_to": false, "default_nonmember_action": - "hold", "posting_address": "test@example.org", "http_etag": "\"844dfa3141895bd6e9e2fe0cc3ac2614f6f8104a\"", + body: {string: !!python/unicode '{"autorespond_postings": "none", "subject_prefix": + "[Test] ", "reply_to_address": "", "autoresponse_request_text": "", "volume": + 1, "display_name": "Test", "subscription_policy": "confirm", "leave_address": + "test-leave@example.org", "last_post_at": null, "convert_html_to_plaintext": + false, "posting_pipeline": "default-posting-pipeline", "admin_notify_mchanges": + false, "posting_address": "test@example.org", "post_id": 1, "reply_goes_to_list": + "no_munging", "anonymous_list": false, "default_member_action": "defer", "scheme": + "http", "list_name": "test", "archive_policy": "public", "collapse_alternatives": + true, "autoresponse_owner_text": "", "request_address": "test-request@example.org", + "acceptable_aliases": [], "include_rfc2369_headers": true, "default_nonmember_action": + "hold", "description": "", "no_reply_address": "noreply@example.org", "welcome_message_uri": + "mailman:///welcome.txt", "advertised": true, "mail_host": "example.org", "bounces_address": "test-bounces@example.org", "autorespond_owner": "none", - "created_at": "2015-11-11T12:49:38.244516", "digest_size_threshold": 30.0, - "web_host": "example.org", "anonymous_list": false, "scheme": "http", "digest_last_sent_at": - null, "subject_prefix": "[Test] ", "mail_host": "example.org", "include_rfc2369_headers": - true}'} + "created_at": "2015-11-11T08:52:21.804288", "autoresponse_grace_period": "90d", + "http_etag": "\"2231d4e997010bb6438b563d2948fac3695a7232\"", "administrivia": + true, "fqdn_listname": "test@example.org", "send_welcome_message": true, "autoresponse_postings_text": + "", "allow_list_posts": true, "digest_size_threshold": 30.0, "admin_immed_notify": + true, "digest_last_sent_at": null, "web_host": "example.org", "first_strip_reply_to": + false, "filter_content": false, "join_address": "test-join@example.org", "next_digest_number": + 1, "owner_address": "test-owner@example.org", "autorespond_requests": "none"}'} headers: content-length: ['1627'] content-type: [application/json; charset=utf-8] - date: ['Wed, 11 Nov 2015 12:49:38 GMT'] + date: ['Wed, 11 Nov 2015 08:52:22 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: diff --git a/src/postorius/tests/fixtures/vcr_cassettes/test_list_subscription.yaml b/src/postorius/tests/fixtures/vcr_cassettes/test_list_subscription.yaml index 3dce68a..c904ff7 100644 --- a/src/postorius/tests/fixtures/vcr_cassettes/test_list_subscription.yaml +++ b/src/postorius/tests/fixtures/vcr_cassettes/test_list_subscription.yaml @@ -168,6 +168,22 @@ !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] !!python/unicode 'user-agent': [!!python/unicode 'GNU Mailman REST client v1.0.0'] method: !!python/unicode 'GET' + uri: http://localhost:9001/3.0/users/test@example.com + response: + body: {string: !!python/unicode '404 Not Found'} + headers: + content-length: ['13'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 11 Nov 2015 08:52:20 GMT'] + server: [WSGIServer/0.2 CPython/3.4.2] + status: {code: 404, message: Not Found} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] + !!python/unicode 'user-agent': [!!python/unicode 'GNU Mailman REST client v1.0.0'] + method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/open_list.example.com/roster/owner response: body: {string: !!python/unicode '{"http_etag": "\"32223434a0f3af4cdc4673d1fbc5bac1f6d98fd3\"", diff --git a/src/postorius/tests/fixtures/vcr_cassettes/test_list_subscription_moderate.yaml b/src/postorius/tests/fixtures/vcr_cassettes/test_list_subscription_moderate.yaml index c2e6876..24fa436 100644 --- a/src/postorius/tests/fixtures/vcr_cassettes/test_list_subscription_moderate.yaml +++ b/src/postorius/tests/fixtures/vcr_cassettes/test_list_subscription_moderate.yaml @@ -169,6 +169,22 @@ !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] !!python/unicode 'user-agent': [!!python/unicode 'GNU Mailman REST client v1.0.0'] method: !!python/unicode 'GET' + uri: http://localhost:9001/3.0/users/test@example.com + response: + body: {string: !!python/unicode '404 Not Found'} + headers: + content-length: ['13'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 11 Nov 2015 08:52:19 GMT'] + server: [WSGIServer/0.2 CPython/3.4.2] + status: {code: 404, message: Not Found} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] + !!python/unicode 'user-agent': [!!python/unicode 'GNU Mailman REST client v1.0.0'] + method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/moderate_subs.example.com/roster/owner response: body: {string: !!python/unicode '{"http_etag": "\"32223434a0f3af4cdc4673d1fbc5bac1f6d98fd3\"", diff --git a/src/postorius/tests/fixtures/vcr_cassettes/test_list_summary.yaml b/src/postorius/tests/fixtures/vcr_cassettes/test_list_summary.yaml index 5bec76d..f507dc7 100644 --- a/src/postorius/tests/fixtures/vcr_cassettes/test_list_summary.yaml +++ b/src/postorius/tests/fixtures/vcr_cassettes/test_list_summary.yaml @@ -326,6 +326,22 @@ !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] !!python/unicode 'user-agent': [!!python/unicode 'GNU Mailman REST client v1.0.0'] method: !!python/unicode 'GET' + uri: http://localhost:9001/3.0/users/test@example.com + response: + body: {string: !!python/unicode '404 Not Found'} + headers: + content-length: ['13'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 11 Nov 2015 12:49:43 GMT'] + server: [WSGIServer/0.2 CPython/3.4.2] + status: {code: 404, message: Not Found} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] + !!python/unicode 'user-agent': [!!python/unicode 'GNU Mailman REST client v1.0.0'] + method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/foo.example.com/roster/owner response: body: {string: !!python/unicode '{"http_etag": "\"32223434a0f3af4cdc4673d1fbc5bac1f6d98fd3\"", @@ -345,12 +361,12 @@ method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/foo.example.com/roster/moderator response: - body: {string: !!python/unicode '{"http_etag": "\"32223434a0f3af4cdc4673d1fbc5bac1f6d98fd3\"", - "total_size": 0, "start": 0}'} + body: {string: !!python/unicode '{"total_size": 0, "http_etag": "\"32223434a0f3af4cdc4673d1fbc5bac1f6d98fd3\"", + "start": 0}'} headers: content-length: ['90'] content-type: [application/json; charset=utf-8] - date: ['Wed, 11 Nov 2015 12:49:43 GMT'] + date: ['Wed, 11 Nov 2015 08:52:26 GMT'] server: [WSGIServer/0.2 CPython/3.4.2] status: {code: 200, message: OK} - request: @@ -360,22 +376,6 @@ !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] !!python/unicode 'user-agent': [!!python/unicode 'GNU Mailman REST client v1.0.0'] method: !!python/unicode 'GET' - uri: http://localhost:9001/3.0/users/test@example.com - response: - body: {string: !!python/unicode '404 Not Found'} - headers: - content-length: ['13'] - content-type: [application/json; charset=utf-8] - date: ['Wed, 11 Nov 2015 12:49:43 GMT'] - server: [WSGIServer/0.2 CPython/3.4.2] - status: {code: 404, message: Not Found} -- request: - body: null - headers: - accept-encoding: ['gzip, deflate'] - !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] - !!python/unicode 'user-agent': [!!python/unicode 'GNU Mailman REST client v1.0.0'] - method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists/foo.example.com/member/test@example.com response: body: {string: !!python/unicode '{}'} @@ -570,42 +570,6 @@ !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] !!python/unicode 'user-agent': [!!python/unicode 'GNU Mailman REST client v1.0.0'] method: !!python/unicode 'GET' - uri: http://localhost:9001/3.0/lists/foo@example.com/config - response: - body: {string: !!python/unicode '{"autoresponse_grace_period": "90d", "autorespond_requests": - "none", "display_name": "Foo", "default_member_action": "defer", "no_reply_address": - "noreply@example.com", "autorespond_postings": "none", "admin_notify_mchanges": - false, "fqdn_listname": "foo@example.com", "autoresponse_postings_text": "", - "advertised": true, "description": "", "reply_goes_to_list": "no_munging", - "post_id": 1, "filter_content": false, "last_post_at": null, "next_digest_number": - 1, "autoresponse_owner_text": "", "acceptable_aliases": [], "administrivia": - true, "collapse_alternatives": true, "owner_address": "foo-owner@example.com", - "welcome_message_uri": "mailman:///welcome.txt", "allow_list_posts": true, - "subscription_policy": "confirm", "list_name": "foo", "admin_immed_notify": - true, "leave_address": "foo-leave@example.com", "autoresponse_request_text": - "", "posting_pipeline": "default-posting-pipeline", "convert_html_to_plaintext": - false, "reply_to_address": "", "request_address": "foo-request@example.com", - "join_address": "foo-join@example.com", "send_welcome_message": true, "archive_policy": - "public", "volume": 1, "first_strip_reply_to": false, "default_nonmember_action": - "hold", "posting_address": "foo@example.com", "http_etag": "\"06097e71936fc44c4d75a421a3e15230e685359f\"", - "bounces_address": "foo-bounces@example.com", "autorespond_owner": "none", - "created_at": "2015-11-11T12:49:44.045527", "digest_size_threshold": 30.0, - "web_host": "example.com", "anonymous_list": false, "scheme": "http", "digest_last_sent_at": - null, "subject_prefix": "[Foo] ", "mail_host": "example.com", "include_rfc2369_headers": - true}'} - headers: - content-length: ['1617'] - content-type: [application/json; charset=utf-8] - date: ['Wed, 11 Nov 2015 12:49:44 GMT'] - server: [WSGIServer/0.2 CPython/3.4.2] - status: {code: 200, message: OK} -- request: - body: null - headers: - accept-encoding: ['gzip, deflate'] - !!python/unicode 'authorization': [!!python/unicode 'Basic cmVzdGFkbWluOnJlc3RwYXNz'] - !!python/unicode 'user-agent': [!!python/unicode 'GNU Mailman REST client v1.0.0'] - method: !!python/unicode 'GET' uri: http://localhost:9001/3.0/lists response: body: {string: !!python/unicode '{"entries": [{"display_name": "Foo", "list_id":