diff --git a/src/postorius/tests/fixtures/vcr_cassettes/AddModeratorTest.test_new_moderator_added.yaml b/src/postorius/tests/fixtures/vcr_cassettes/AddModeratorTest.test_new_moderator_added.yaml index fef1227..e8b38be 100644 --- a/src/postorius/tests/fixtures/vcr_cassettes/AddModeratorTest.test_new_moderator_added.yaml +++ b/src/postorius/tests/fixtures/vcr_cassettes/AddModeratorTest.test_new_moderator_added.yaml @@ -115,10 +115,10 @@ uri: http://localhost:9001/3.0/lists/foo.example.com/roster/moderator response: body: {string: !!python/unicode '{"entries": [{"address": "http://localhost:9001/3.0/addresses/newmod@example.com", - "delivery_mode": "regular", "email": "newmod@example.com", "http_etag": "\"a81587b982580f8c56376e18931e13c26ebb400d\"", + "delivery_mode": "regular", "email": "newmod@example.com", "http_etag": "\"01e572d45c10662ebe7b27e094be53fa36bb23e1\"", "list_id": "foo.example.com", "member_id": 1, "moderation_action": "accept", "role": "moderator", "self_link": "http://localhost:9001/3.0/members/1", "user": - "http://localhost:9001/3.0/users/2"}], "http_etag": "\"4aee3e54b318f2b2b20c079d61332487761ef57d\"", + "http://localhost:9001/3.0/users/6"}], "http_etag": "\"91ceb5b27a2b0e697c1d38abbb875ea220e99082\"", "start": 0, "total_size": 1}'} headers: content-length: ['489'] @@ -132,10 +132,10 @@ uri: http://localhost:9001/3.0/lists/foo.example.com/roster/moderator response: body: {string: !!python/unicode '{"entries": [{"address": "http://localhost:9001/3.0/addresses/newmod@example.com", - "delivery_mode": "regular", "email": "newmod@example.com", "http_etag": "\"a81587b982580f8c56376e18931e13c26ebb400d\"", + "delivery_mode": "regular", "email": "newmod@example.com", "http_etag": "\"01e572d45c10662ebe7b27e094be53fa36bb23e1\"", "list_id": "foo.example.com", "member_id": 1, "moderation_action": "accept", "role": "moderator", "self_link": "http://localhost:9001/3.0/members/1", "user": - "http://localhost:9001/3.0/users/2"}], "http_etag": "\"4aee3e54b318f2b2b20c079d61332487761ef57d\"", + "http://localhost:9001/3.0/users/6"}], "http_etag": "\"91ceb5b27a2b0e697c1d38abbb875ea220e99082\"", "start": 0, "total_size": 1}'} headers: content-length: ['489'] diff --git a/src/postorius/tests/fixtures/vcr_cassettes/AddRemoveOwnerTest.test_add_remove_owner.yaml b/src/postorius/tests/fixtures/vcr_cassettes/AddRemoveOwnerTest.test_add_remove_owner.yaml index 8158e36..dd45d51 100644 --- a/src/postorius/tests/fixtures/vcr_cassettes/AddRemoveOwnerTest.test_add_remove_owner.yaml +++ b/src/postorius/tests/fixtures/vcr_cassettes/AddRemoveOwnerTest.test_add_remove_owner.yaml @@ -76,8 +76,8 @@ uri: http://localhost:9001/3.0/users/su@example.com response: body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag": - "\"bb1c2e6094a96b17e2d5dbf487291f7667f69f75\"", "is_server_owner": false, - "self_link": "http://localhost:9001/3.0/users/3", "user_id": 3}'} + "\"c7360c029a83c97672ca38dd8b008d48e05949a6\"", "is_server_owner": false, + "self_link": "http://localhost:9001/3.0/users/7", "user_id": 7}'} headers: content-length: ['188'] content-type: [application/json; charset=utf-8] @@ -87,12 +87,12 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode GET - uri: http://localhost:9001/3.0/users/3/addresses + uri: http://localhost:9001/3.0/users/7/addresses response: body: {string: !!python/unicode '{"entries": [{"email": "su@example.com", "http_etag": - "\"91c297417f4c33cf707148d031e79b6cb316f158\"", "original_email": "su@example.com", + "\"4e3a66d2b3908d302befe905a19dcb48a00acd7a\"", "original_email": "su@example.com", "registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/su@example.com", - "user": "http://localhost:9001/3.0/users/3"}], "http_etag": "\"e9a7c409726b93f93aaf643fce49558cf27237e1\"", + "user": "http://localhost:9001/3.0/users/7"}], "http_etag": "\"ad9848f665afaa839c04e50665383975be62a504\"", "start": 0, "total_size": 1}'} headers: content-length: ['381'] @@ -134,8 +134,8 @@ uri: http://localhost:9001/3.0/users/su@example.com response: body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag": - "\"bb1c2e6094a96b17e2d5dbf487291f7667f69f75\"", "is_server_owner": false, - "self_link": "http://localhost:9001/3.0/users/3", "user_id": 3}'} + "\"c7360c029a83c97672ca38dd8b008d48e05949a6\"", "is_server_owner": false, + "self_link": "http://localhost:9001/3.0/users/7", "user_id": 7}'} headers: content-length: ['188'] content-type: [application/json; charset=utf-8] @@ -145,12 +145,12 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode GET - uri: http://localhost:9001/3.0/users/3/addresses + uri: http://localhost:9001/3.0/users/7/addresses response: body: {string: !!python/unicode '{"entries": [{"email": "su@example.com", "http_etag": - "\"91c297417f4c33cf707148d031e79b6cb316f158\"", "original_email": "su@example.com", + "\"4e3a66d2b3908d302befe905a19dcb48a00acd7a\"", "original_email": "su@example.com", "registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/su@example.com", - "user": "http://localhost:9001/3.0/users/3"}], "http_etag": "\"e9a7c409726b93f93aaf643fce49558cf27237e1\"", + "user": "http://localhost:9001/3.0/users/7"}], "http_etag": "\"ad9848f665afaa839c04e50665383975be62a504\"", "start": 0, "total_size": 1}'} headers: content-length: ['381'] @@ -180,14 +180,14 @@ response: body: {string: !!python/unicode '{"entries": [{"address": "http://localhost:9001/3.0/addresses/newowner@example.com", "delivery_mode": "regular", "email": "newowner@example.com", "http_etag": - "\"fb41aa731d80a00d2c6958569f6e6be1cdc99830\"", "list_id": "foo.example.com", + "\"b0ab9ea4351ce9097f0a6528ff6e705061d5d3b4\"", "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/4"}, + "http://localhost:9001/3.0/members/3", "user": "http://localhost:9001/3.0/users/8"}, {"address": "http://localhost:9001/3.0/addresses/su@example.com", "delivery_mode": - "regular", "email": "su@example.com", "http_etag": "\"4868e9fbb05d6e03e5294e473e37008cddc8dc5d\"", + "regular", "email": "su@example.com", "http_etag": "\"ea8a337f32d6d26e3a501fe28f6e419f7407ea4e\"", "list_id": "foo.example.com", "member_id": 2, "moderation_action": "accept", "role": "owner", "self_link": "http://localhost:9001/3.0/members/2", "user": - "http://localhost:9001/3.0/users/3"}], "http_etag": "\"bfe1f3de81d61a1c95a5f654fb0b683e1088fd65\"", + "http://localhost:9001/3.0/users/7"}], "http_etag": "\"1e3d423ef5a404e1d1f86df7c67a216adba691a8\"", "start": 0, "total_size": 2}'} headers: content-length: ['863'] @@ -202,14 +202,14 @@ response: body: {string: !!python/unicode '{"entries": [{"address": "http://localhost:9001/3.0/addresses/newowner@example.com", "delivery_mode": "regular", "email": "newowner@example.com", "http_etag": - "\"fb41aa731d80a00d2c6958569f6e6be1cdc99830\"", "list_id": "foo.example.com", + "\"b0ab9ea4351ce9097f0a6528ff6e705061d5d3b4\"", "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/4"}, + "http://localhost:9001/3.0/members/3", "user": "http://localhost:9001/3.0/users/8"}, {"address": "http://localhost:9001/3.0/addresses/su@example.com", "delivery_mode": - "regular", "email": "su@example.com", "http_etag": "\"4868e9fbb05d6e03e5294e473e37008cddc8dc5d\"", + "regular", "email": "su@example.com", "http_etag": "\"ea8a337f32d6d26e3a501fe28f6e419f7407ea4e\"", "list_id": "foo.example.com", "member_id": 2, "moderation_action": "accept", "role": "owner", "self_link": "http://localhost:9001/3.0/members/2", "user": - "http://localhost:9001/3.0/users/3"}], "http_etag": "\"bfe1f3de81d61a1c95a5f654fb0b683e1088fd65\"", + "http://localhost:9001/3.0/users/7"}], "http_etag": "\"1e3d423ef5a404e1d1f86df7c67a216adba691a8\"", "start": 0, "total_size": 2}'} headers: content-length: ['863'] @@ -223,8 +223,8 @@ uri: http://localhost:9001/3.0/users/su@example.com response: body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag": - "\"bb1c2e6094a96b17e2d5dbf487291f7667f69f75\"", "is_server_owner": false, - "self_link": "http://localhost:9001/3.0/users/3", "user_id": 3}'} + "\"c7360c029a83c97672ca38dd8b008d48e05949a6\"", "is_server_owner": false, + "self_link": "http://localhost:9001/3.0/users/7", "user_id": 7}'} headers: content-length: ['188'] content-type: [application/json; charset=utf-8] @@ -234,12 +234,12 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode GET - uri: http://localhost:9001/3.0/users/3/addresses + uri: http://localhost:9001/3.0/users/7/addresses response: body: {string: !!python/unicode '{"entries": [{"email": "su@example.com", "http_etag": - "\"91c297417f4c33cf707148d031e79b6cb316f158\"", "original_email": "su@example.com", + "\"4e3a66d2b3908d302befe905a19dcb48a00acd7a\"", "original_email": "su@example.com", "registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/su@example.com", - "user": "http://localhost:9001/3.0/users/3"}], "http_etag": "\"e9a7c409726b93f93aaf643fce49558cf27237e1\"", + "user": "http://localhost:9001/3.0/users/7"}], "http_etag": "\"ad9848f665afaa839c04e50665383975be62a504\"", "start": 0, "total_size": 1}'} headers: content-length: ['381'] @@ -269,14 +269,14 @@ response: body: {string: !!python/unicode '{"entries": [{"address": "http://localhost:9001/3.0/addresses/newowner@example.com", "delivery_mode": "regular", "email": "newowner@example.com", "http_etag": - "\"fb41aa731d80a00d2c6958569f6e6be1cdc99830\"", "list_id": "foo.example.com", + "\"b0ab9ea4351ce9097f0a6528ff6e705061d5d3b4\"", "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/4"}, + "http://localhost:9001/3.0/members/3", "user": "http://localhost:9001/3.0/users/8"}, {"address": "http://localhost:9001/3.0/addresses/su@example.com", "delivery_mode": - "regular", "email": "su@example.com", "http_etag": "\"4868e9fbb05d6e03e5294e473e37008cddc8dc5d\"", + "regular", "email": "su@example.com", "http_etag": "\"ea8a337f32d6d26e3a501fe28f6e419f7407ea4e\"", "list_id": "foo.example.com", "member_id": 2, "moderation_action": "accept", "role": "owner", "self_link": "http://localhost:9001/3.0/members/2", "user": - "http://localhost:9001/3.0/users/3"}], "http_etag": "\"bfe1f3de81d61a1c95a5f654fb0b683e1088fd65\"", + "http://localhost:9001/3.0/users/7"}], "http_etag": "\"1e3d423ef5a404e1d1f86df7c67a216adba691a8\"", "start": 0, "total_size": 2}'} headers: content-length: ['863'] @@ -301,10 +301,10 @@ uri: http://localhost:9001/3.0/lists/foo.example.com/roster/owner response: body: {string: !!python/unicode '{"entries": [{"address": "http://localhost:9001/3.0/addresses/su@example.com", - "delivery_mode": "regular", "email": "su@example.com", "http_etag": "\"4868e9fbb05d6e03e5294e473e37008cddc8dc5d\"", + "delivery_mode": "regular", "email": "su@example.com", "http_etag": "\"ea8a337f32d6d26e3a501fe28f6e419f7407ea4e\"", "list_id": "foo.example.com", "member_id": 2, "moderation_action": "accept", "role": "owner", "self_link": "http://localhost:9001/3.0/members/2", "user": - "http://localhost:9001/3.0/users/3"}], "http_etag": "\"9ef2eb6a7e7a2238597dba50adcb6d778d9a4684\"", + "http://localhost:9001/3.0/users/7"}], "http_etag": "\"3c3dd4982baeac28aae65e24aae7d629a8b373ef\"", "start": 0, "total_size": 1}'} headers: content-length: ['477'] diff --git a/src/postorius/tests/fixtures/vcr_cassettes/AddRemoveOwnerTest.test_remove_owner_as_owner_self_last.yaml b/src/postorius/tests/fixtures/vcr_cassettes/AddRemoveOwnerTest.test_remove_owner_as_owner_self_last.yaml index dcf741f..1404c48 100644 --- a/src/postorius/tests/fixtures/vcr_cassettes/AddRemoveOwnerTest.test_remove_owner_as_owner_self_last.yaml +++ b/src/postorius/tests/fixtures/vcr_cassettes/AddRemoveOwnerTest.test_remove_owner_as_owner_self_last.yaml @@ -105,14 +105,14 @@ response: body: {string: !!python/unicode '{"entries": [{"address": "http://localhost:9001/3.0/addresses/otherowner@example.com", "delivery_mode": "regular", "email": "otherowner@example.com", "http_etag": - "\"0a0b6d3010447e40c0bc5014f892b62ef88cc9c3\"", "list_id": "foo.example.com", + "\"274d6a800f2e7db18babd8c9938e2e822a713807\"", "list_id": "foo.example.com", "member_id": 5, "moderation_action": "accept", "role": "owner", "self_link": - "http://localhost:9001/3.0/members/5", "user": "http://localhost:9001/3.0/users/5"}, + "http://localhost:9001/3.0/members/5", "user": "http://localhost:9001/3.0/users/9"}, {"address": "http://localhost:9001/3.0/addresses/su@example.com", "delivery_mode": - "regular", "email": "su@example.com", "http_etag": "\"c8d1f64eaddad1e9e5cebe8a1c43c90efa31f248\"", + "regular", "email": "su@example.com", "http_etag": "\"702cfcf0956594e29bd8b568adc28583bb41d877\"", "list_id": "foo.example.com", "member_id": 4, "moderation_action": "accept", "role": "owner", "self_link": "http://localhost:9001/3.0/members/4", "user": - "http://localhost:9001/3.0/users/3"}], "http_etag": "\"c11b8de8bc2a0d9746932bfd25604292bc148349\"", + "http://localhost:9001/3.0/users/7"}], "http_etag": "\"c2200dea20245cedba89785eeebf67931942d08e\"", "start": 0, "total_size": 2}'} headers: content-length: ['867'] @@ -127,14 +127,14 @@ response: body: {string: !!python/unicode '{"entries": [{"address": "http://localhost:9001/3.0/addresses/otherowner@example.com", "delivery_mode": "regular", "email": "otherowner@example.com", "http_etag": - "\"0a0b6d3010447e40c0bc5014f892b62ef88cc9c3\"", "list_id": "foo.example.com", + "\"274d6a800f2e7db18babd8c9938e2e822a713807\"", "list_id": "foo.example.com", "member_id": 5, "moderation_action": "accept", "role": "owner", "self_link": - "http://localhost:9001/3.0/members/5", "user": "http://localhost:9001/3.0/users/5"}, + "http://localhost:9001/3.0/members/5", "user": "http://localhost:9001/3.0/users/9"}, {"address": "http://localhost:9001/3.0/addresses/su@example.com", "delivery_mode": - "regular", "email": "su@example.com", "http_etag": "\"c8d1f64eaddad1e9e5cebe8a1c43c90efa31f248\"", + "regular", "email": "su@example.com", "http_etag": "\"702cfcf0956594e29bd8b568adc28583bb41d877\"", "list_id": "foo.example.com", "member_id": 4, "moderation_action": "accept", "role": "owner", "self_link": "http://localhost:9001/3.0/members/4", "user": - "http://localhost:9001/3.0/users/3"}], "http_etag": "\"c11b8de8bc2a0d9746932bfd25604292bc148349\"", + "http://localhost:9001/3.0/users/7"}], "http_etag": "\"c2200dea20245cedba89785eeebf67931942d08e\"", "start": 0, "total_size": 2}'} headers: content-length: ['867'] @@ -148,8 +148,8 @@ uri: http://localhost:9001/3.0/users/su@example.com response: body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag": - "\"bb1c2e6094a96b17e2d5dbf487291f7667f69f75\"", "is_server_owner": false, - "self_link": "http://localhost:9001/3.0/users/3", "user_id": 3}'} + "\"c7360c029a83c97672ca38dd8b008d48e05949a6\"", "is_server_owner": false, + "self_link": "http://localhost:9001/3.0/users/7", "user_id": 7}'} headers: content-length: ['188'] content-type: [application/json; charset=utf-8] @@ -159,12 +159,12 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode GET - uri: http://localhost:9001/3.0/users/3/addresses + uri: http://localhost:9001/3.0/users/7/addresses response: body: {string: !!python/unicode '{"entries": [{"email": "su@example.com", "http_etag": - "\"91c297417f4c33cf707148d031e79b6cb316f158\"", "original_email": "su@example.com", + "\"4e3a66d2b3908d302befe905a19dcb48a00acd7a\"", "original_email": "su@example.com", "registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/su@example.com", - "user": "http://localhost:9001/3.0/users/3"}], "http_etag": "\"e9a7c409726b93f93aaf643fce49558cf27237e1\"", + "user": "http://localhost:9001/3.0/users/7"}], "http_etag": "\"ad9848f665afaa839c04e50665383975be62a504\"", "start": 0, "total_size": 1}'} headers: content-length: ['381'] @@ -194,14 +194,14 @@ response: body: {string: !!python/unicode '{"entries": [{"address": "http://localhost:9001/3.0/addresses/otherowner@example.com", "delivery_mode": "regular", "email": "otherowner@example.com", "http_etag": - "\"0a0b6d3010447e40c0bc5014f892b62ef88cc9c3\"", "list_id": "foo.example.com", + "\"274d6a800f2e7db18babd8c9938e2e822a713807\"", "list_id": "foo.example.com", "member_id": 5, "moderation_action": "accept", "role": "owner", "self_link": - "http://localhost:9001/3.0/members/5", "user": "http://localhost:9001/3.0/users/5"}, + "http://localhost:9001/3.0/members/5", "user": "http://localhost:9001/3.0/users/9"}, {"address": "http://localhost:9001/3.0/addresses/su@example.com", "delivery_mode": - "regular", "email": "su@example.com", "http_etag": "\"c8d1f64eaddad1e9e5cebe8a1c43c90efa31f248\"", + "regular", "email": "su@example.com", "http_etag": "\"702cfcf0956594e29bd8b568adc28583bb41d877\"", "list_id": "foo.example.com", "member_id": 4, "moderation_action": "accept", "role": "owner", "self_link": "http://localhost:9001/3.0/members/4", "user": - "http://localhost:9001/3.0/users/3"}], "http_etag": "\"c11b8de8bc2a0d9746932bfd25604292bc148349\"", + "http://localhost:9001/3.0/users/7"}], "http_etag": "\"c2200dea20245cedba89785eeebf67931942d08e\"", "start": 0, "total_size": 2}'} headers: content-length: ['867'] @@ -227,10 +227,10 @@ response: body: {string: !!python/unicode '{"entries": [{"address": "http://localhost:9001/3.0/addresses/otherowner@example.com", "delivery_mode": "regular", "email": "otherowner@example.com", "http_etag": - "\"0a0b6d3010447e40c0bc5014f892b62ef88cc9c3\"", "list_id": "foo.example.com", + "\"274d6a800f2e7db18babd8c9938e2e822a713807\"", "list_id": "foo.example.com", "member_id": 5, "moderation_action": "accept", "role": "owner", "self_link": - "http://localhost:9001/3.0/members/5", "user": "http://localhost:9001/3.0/users/5"}], - "http_etag": "\"f66698fd6568b6846fa7bbbe8819637aa4511625\"", "start": 0, "total_size": + "http://localhost:9001/3.0/members/5", "user": "http://localhost:9001/3.0/users/9"}], + "http_etag": "\"e34dd28c197382476e5166f645757c51ac27ae4b\"", "start": 0, "total_size": 1}'} headers: content-length: ['493'] @@ -268,10 +268,10 @@ uri: http://localhost:9001/3.0/lists/foo.example.com/roster/owner response: body: {string: !!python/unicode '{"entries": [{"address": "http://localhost:9001/3.0/addresses/su@example.com", - "delivery_mode": "regular", "email": "su@example.com", "http_etag": "\"d802d02cb6fbb4009be17b7d50efd2e4d8a42d6d\"", + "delivery_mode": "regular", "email": "su@example.com", "http_etag": "\"112ae38114517bb72d3f753c79d57f88d5abf8c8\"", "list_id": "foo.example.com", "member_id": 6, "moderation_action": "accept", "role": "owner", "self_link": "http://localhost:9001/3.0/members/6", "user": - "http://localhost:9001/3.0/users/3"}], "http_etag": "\"069dbb66851a30c815295bf7a852bcc2012009e7\"", + "http://localhost:9001/3.0/users/7"}], "http_etag": "\"22510d50c9b877043ce757db5598b6bd9fc46c1c\"", "start": 0, "total_size": 1}'} headers: content-length: ['477'] @@ -285,10 +285,10 @@ uri: http://localhost:9001/3.0/lists/foo.example.com/roster/owner response: body: {string: !!python/unicode '{"entries": [{"address": "http://localhost:9001/3.0/addresses/su@example.com", - "delivery_mode": "regular", "email": "su@example.com", "http_etag": "\"d802d02cb6fbb4009be17b7d50efd2e4d8a42d6d\"", + "delivery_mode": "regular", "email": "su@example.com", "http_etag": "\"112ae38114517bb72d3f753c79d57f88d5abf8c8\"", "list_id": "foo.example.com", "member_id": 6, "moderation_action": "accept", "role": "owner", "self_link": "http://localhost:9001/3.0/members/6", "user": - "http://localhost:9001/3.0/users/3"}], "http_etag": "\"069dbb66851a30c815295bf7a852bcc2012009e7\"", + "http://localhost:9001/3.0/users/7"}], "http_etag": "\"22510d50c9b877043ce757db5598b6bd9fc46c1c\"", "start": 0, "total_size": 1}'} headers: content-length: ['477'] @@ -302,8 +302,8 @@ uri: http://localhost:9001/3.0/users/su@example.com response: body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag": - "\"bb1c2e6094a96b17e2d5dbf487291f7667f69f75\"", "is_server_owner": false, - "self_link": "http://localhost:9001/3.0/users/3", "user_id": 3}'} + "\"c7360c029a83c97672ca38dd8b008d48e05949a6\"", "is_server_owner": false, + "self_link": "http://localhost:9001/3.0/users/7", "user_id": 7}'} headers: content-length: ['188'] content-type: [application/json; charset=utf-8] @@ -313,12 +313,12 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode GET - uri: http://localhost:9001/3.0/users/3/addresses + uri: http://localhost:9001/3.0/users/7/addresses response: body: {string: !!python/unicode '{"entries": [{"email": "su@example.com", "http_etag": - "\"91c297417f4c33cf707148d031e79b6cb316f158\"", "original_email": "su@example.com", + "\"4e3a66d2b3908d302befe905a19dcb48a00acd7a\"", "original_email": "su@example.com", "registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/su@example.com", - "user": "http://localhost:9001/3.0/users/3"}], "http_etag": "\"e9a7c409726b93f93aaf643fce49558cf27237e1\"", + "user": "http://localhost:9001/3.0/users/7"}], "http_etag": "\"ad9848f665afaa839c04e50665383975be62a504\"", "start": 0, "total_size": 1}'} headers: content-length: ['381'] @@ -347,10 +347,10 @@ uri: http://localhost:9001/3.0/lists/foo.example.com/roster/owner response: body: {string: !!python/unicode '{"entries": [{"address": "http://localhost:9001/3.0/addresses/su@example.com", - "delivery_mode": "regular", "email": "su@example.com", "http_etag": "\"d802d02cb6fbb4009be17b7d50efd2e4d8a42d6d\"", + "delivery_mode": "regular", "email": "su@example.com", "http_etag": "\"112ae38114517bb72d3f753c79d57f88d5abf8c8\"", "list_id": "foo.example.com", "member_id": 6, "moderation_action": "accept", "role": "owner", "self_link": "http://localhost:9001/3.0/members/6", "user": - "http://localhost:9001/3.0/users/3"}], "http_etag": "\"069dbb66851a30c815295bf7a852bcc2012009e7\"", + "http://localhost:9001/3.0/users/7"}], "http_etag": "\"22510d50c9b877043ce757db5598b6bd9fc46c1c\"", "start": 0, "total_size": 1}'} headers: content-length: ['477'] @@ -364,10 +364,10 @@ uri: http://localhost:9001/3.0/lists/foo.example.com/roster/owner response: body: {string: !!python/unicode '{"entries": [{"address": "http://localhost:9001/3.0/addresses/su@example.com", - "delivery_mode": "regular", "email": "su@example.com", "http_etag": "\"d802d02cb6fbb4009be17b7d50efd2e4d8a42d6d\"", + "delivery_mode": "regular", "email": "su@example.com", "http_etag": "\"112ae38114517bb72d3f753c79d57f88d5abf8c8\"", "list_id": "foo.example.com", "member_id": 6, "moderation_action": "accept", "role": "owner", "self_link": "http://localhost:9001/3.0/members/6", "user": - "http://localhost:9001/3.0/users/3"}], "http_etag": "\"069dbb66851a30c815295bf7a852bcc2012009e7\"", + "http://localhost:9001/3.0/users/7"}], "http_etag": "\"22510d50c9b877043ce757db5598b6bd9fc46c1c\"", "start": 0, "total_size": 1}'} headers: content-length: ['477'] diff --git a/src/postorius/tests/fixtures/vcr_cassettes/AddRemoveOwnerTest.test_remove_owner_by_owner.yaml b/src/postorius/tests/fixtures/vcr_cassettes/AddRemoveOwnerTest.test_remove_owner_by_owner.yaml index 8204a43..8c9b14c 100644 --- a/src/postorius/tests/fixtures/vcr_cassettes/AddRemoveOwnerTest.test_remove_owner_by_owner.yaml +++ b/src/postorius/tests/fixtures/vcr_cassettes/AddRemoveOwnerTest.test_remove_owner_by_owner.yaml @@ -76,10 +76,10 @@ uri: http://localhost:9001/3.0/lists/foo.example.com/roster/owner response: body: {string: !!python/unicode '{"entries": [{"address": "http://localhost:9001/3.0/addresses/su@example.com", - "delivery_mode": "regular", "email": "su@example.com", "http_etag": "\"f9ff27050671f86f8667afcf197da69bec2a818d\"", + "delivery_mode": "regular", "email": "su@example.com", "http_etag": "\"d6564606540aa51e459b721885361f0681b88052\"", "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/3"}], "http_etag": "\"43cc1ae5f9e7339db43f994b05ff01c12660bb2b\"", + "http://localhost:9001/3.0/users/7"}], "http_etag": "\"5dafdb1115e0ceb4d5c5f5745c9973d16703682a\"", "start": 0, "total_size": 1}'} headers: content-length: ['477'] @@ -93,8 +93,8 @@ uri: http://localhost:9001/3.0/users/su@example.com response: body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag": - "\"bb1c2e6094a96b17e2d5dbf487291f7667f69f75\"", "is_server_owner": false, - "self_link": "http://localhost:9001/3.0/users/3", "user_id": 3}'} + "\"c7360c029a83c97672ca38dd8b008d48e05949a6\"", "is_server_owner": false, + "self_link": "http://localhost:9001/3.0/users/7", "user_id": 7}'} headers: content-length: ['188'] content-type: [application/json; charset=utf-8] @@ -104,12 +104,12 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode GET - uri: http://localhost:9001/3.0/users/3/addresses + uri: http://localhost:9001/3.0/users/7/addresses response: body: {string: !!python/unicode '{"entries": [{"email": "su@example.com", "http_etag": - "\"91c297417f4c33cf707148d031e79b6cb316f158\"", "original_email": "su@example.com", + "\"4e3a66d2b3908d302befe905a19dcb48a00acd7a\"", "original_email": "su@example.com", "registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/su@example.com", - "user": "http://localhost:9001/3.0/users/3"}], "http_etag": "\"e9a7c409726b93f93aaf643fce49558cf27237e1\"", + "user": "http://localhost:9001/3.0/users/7"}], "http_etag": "\"ad9848f665afaa839c04e50665383975be62a504\"", "start": 0, "total_size": 1}'} headers: content-length: ['381'] @@ -138,10 +138,10 @@ uri: http://localhost:9001/3.0/lists/foo.example.com/roster/owner response: body: {string: !!python/unicode '{"entries": [{"address": "http://localhost:9001/3.0/addresses/su@example.com", - "delivery_mode": "regular", "email": "su@example.com", "http_etag": "\"f9ff27050671f86f8667afcf197da69bec2a818d\"", + "delivery_mode": "regular", "email": "su@example.com", "http_etag": "\"d6564606540aa51e459b721885361f0681b88052\"", "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/3"}], "http_etag": "\"43cc1ae5f9e7339db43f994b05ff01c12660bb2b\"", + "http://localhost:9001/3.0/users/7"}], "http_etag": "\"5dafdb1115e0ceb4d5c5f5745c9973d16703682a\"", "start": 0, "total_size": 1}'} headers: content-length: ['477'] @@ -196,8 +196,8 @@ uri: http://localhost:9001/3.0/users/su@example.com response: body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag": - "\"bb1c2e6094a96b17e2d5dbf487291f7667f69f75\"", "is_server_owner": false, - "self_link": "http://localhost:9001/3.0/users/3", "user_id": 3}'} + "\"c7360c029a83c97672ca38dd8b008d48e05949a6\"", "is_server_owner": false, + "self_link": "http://localhost:9001/3.0/users/7", "user_id": 7}'} headers: content-length: ['188'] content-type: [application/json; charset=utf-8] @@ -207,12 +207,12 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode GET - uri: http://localhost:9001/3.0/users/3/addresses + uri: http://localhost:9001/3.0/users/7/addresses response: body: {string: !!python/unicode '{"entries": [{"email": "su@example.com", "http_etag": - "\"91c297417f4c33cf707148d031e79b6cb316f158\"", "original_email": "su@example.com", + "\"4e3a66d2b3908d302befe905a19dcb48a00acd7a\"", "original_email": "su@example.com", "registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/su@example.com", - "user": "http://localhost:9001/3.0/users/3"}], "http_etag": "\"e9a7c409726b93f93aaf643fce49558cf27237e1\"", + "user": "http://localhost:9001/3.0/users/7"}], "http_etag": "\"ad9848f665afaa839c04e50665383975be62a504\"", "start": 0, "total_size": 1}'} headers: content-length: ['381'] @@ -242,14 +242,14 @@ response: body: {string: !!python/unicode '{"entries": [{"address": "http://localhost:9001/3.0/addresses/newowner@example.com", "delivery_mode": "regular", "email": "newowner@example.com", "http_etag": - "\"2c09b6d02e7e1d09d01b9488106d3d818dd3c3d2\"", "list_id": "foo.example.com", + "\"11ab48d88f947c27fa31e246de34e7414e74e5ac\"", "list_id": "foo.example.com", "member_id": 8, "moderation_action": "accept", "role": "owner", "self_link": - "http://localhost:9001/3.0/members/8", "user": "http://localhost:9001/3.0/users/4"}, + "http://localhost:9001/3.0/members/8", "user": "http://localhost:9001/3.0/users/8"}, {"address": "http://localhost:9001/3.0/addresses/su@example.com", "delivery_mode": - "regular", "email": "su@example.com", "http_etag": "\"f9ff27050671f86f8667afcf197da69bec2a818d\"", + "regular", "email": "su@example.com", "http_etag": "\"d6564606540aa51e459b721885361f0681b88052\"", "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/3"}], "http_etag": "\"109bb14654b14633e1feef88abc1a3746fb37995\"", + "http://localhost:9001/3.0/users/7"}], "http_etag": "\"1b0c5224232125cc46903b554d42ba882dac0661\"", "start": 0, "total_size": 2}'} headers: content-length: ['863'] @@ -292,14 +292,14 @@ response: body: {string: !!python/unicode '{"entries": [{"address": "http://localhost:9001/3.0/addresses/newowner@example.com", "delivery_mode": "regular", "email": "newowner@example.com", "http_etag": - "\"2c09b6d02e7e1d09d01b9488106d3d818dd3c3d2\"", "list_id": "foo.example.com", + "\"11ab48d88f947c27fa31e246de34e7414e74e5ac\"", "list_id": "foo.example.com", "member_id": 8, "moderation_action": "accept", "role": "owner", "self_link": - "http://localhost:9001/3.0/members/8", "user": "http://localhost:9001/3.0/users/4"}, + "http://localhost:9001/3.0/members/8", "user": "http://localhost:9001/3.0/users/8"}, {"address": "http://localhost:9001/3.0/addresses/su@example.com", "delivery_mode": - "regular", "email": "su@example.com", "http_etag": "\"f9ff27050671f86f8667afcf197da69bec2a818d\"", + "regular", "email": "su@example.com", "http_etag": "\"d6564606540aa51e459b721885361f0681b88052\"", "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/3"}], "http_etag": "\"109bb14654b14633e1feef88abc1a3746fb37995\"", + "http://localhost:9001/3.0/users/7"}], "http_etag": "\"1b0c5224232125cc46903b554d42ba882dac0661\"", "start": 0, "total_size": 2}'} headers: content-length: ['863'] @@ -314,14 +314,14 @@ response: body: {string: !!python/unicode '{"entries": [{"address": "http://localhost:9001/3.0/addresses/newowner@example.com", "delivery_mode": "regular", "email": "newowner@example.com", "http_etag": - "\"2c09b6d02e7e1d09d01b9488106d3d818dd3c3d2\"", "list_id": "foo.example.com", + "\"11ab48d88f947c27fa31e246de34e7414e74e5ac\"", "list_id": "foo.example.com", "member_id": 8, "moderation_action": "accept", "role": "owner", "self_link": - "http://localhost:9001/3.0/members/8", "user": "http://localhost:9001/3.0/users/4"}, + "http://localhost:9001/3.0/members/8", "user": "http://localhost:9001/3.0/users/8"}, {"address": "http://localhost:9001/3.0/addresses/su@example.com", "delivery_mode": - "regular", "email": "su@example.com", "http_etag": "\"f9ff27050671f86f8667afcf197da69bec2a818d\"", + "regular", "email": "su@example.com", "http_etag": "\"d6564606540aa51e459b721885361f0681b88052\"", "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/3"}], "http_etag": "\"109bb14654b14633e1feef88abc1a3746fb37995\"", + "http://localhost:9001/3.0/users/7"}], "http_etag": "\"1b0c5224232125cc46903b554d42ba882dac0661\"", "start": 0, "total_size": 2}'} headers: content-length: ['863'] @@ -335,8 +335,8 @@ uri: http://localhost:9001/3.0/users/su@example.com response: body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag": - "\"bb1c2e6094a96b17e2d5dbf487291f7667f69f75\"", "is_server_owner": false, - "self_link": "http://localhost:9001/3.0/users/3", "user_id": 3}'} + "\"c7360c029a83c97672ca38dd8b008d48e05949a6\"", "is_server_owner": false, + "self_link": "http://localhost:9001/3.0/users/7", "user_id": 7}'} headers: content-length: ['188'] content-type: [application/json; charset=utf-8] @@ -346,12 +346,12 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode GET - uri: http://localhost:9001/3.0/users/3/addresses + uri: http://localhost:9001/3.0/users/7/addresses response: body: {string: !!python/unicode '{"entries": [{"email": "su@example.com", "http_etag": - "\"91c297417f4c33cf707148d031e79b6cb316f158\"", "original_email": "su@example.com", + "\"4e3a66d2b3908d302befe905a19dcb48a00acd7a\"", "original_email": "su@example.com", "registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/su@example.com", - "user": "http://localhost:9001/3.0/users/3"}], "http_etag": "\"e9a7c409726b93f93aaf643fce49558cf27237e1\"", + "user": "http://localhost:9001/3.0/users/7"}], "http_etag": "\"ad9848f665afaa839c04e50665383975be62a504\"", "start": 0, "total_size": 1}'} headers: content-length: ['381'] @@ -381,14 +381,14 @@ response: body: {string: !!python/unicode '{"entries": [{"address": "http://localhost:9001/3.0/addresses/newowner@example.com", "delivery_mode": "regular", "email": "newowner@example.com", "http_etag": - "\"2c09b6d02e7e1d09d01b9488106d3d818dd3c3d2\"", "list_id": "foo.example.com", + "\"11ab48d88f947c27fa31e246de34e7414e74e5ac\"", "list_id": "foo.example.com", "member_id": 8, "moderation_action": "accept", "role": "owner", "self_link": - "http://localhost:9001/3.0/members/8", "user": "http://localhost:9001/3.0/users/4"}, + "http://localhost:9001/3.0/members/8", "user": "http://localhost:9001/3.0/users/8"}, {"address": "http://localhost:9001/3.0/addresses/su@example.com", "delivery_mode": - "regular", "email": "su@example.com", "http_etag": "\"f9ff27050671f86f8667afcf197da69bec2a818d\"", + "regular", "email": "su@example.com", "http_etag": "\"d6564606540aa51e459b721885361f0681b88052\"", "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/3"}], "http_etag": "\"109bb14654b14633e1feef88abc1a3746fb37995\"", + "http://localhost:9001/3.0/users/7"}], "http_etag": "\"1b0c5224232125cc46903b554d42ba882dac0661\"", "start": 0, "total_size": 2}'} headers: content-length: ['863'] @@ -431,14 +431,14 @@ response: body: {string: !!python/unicode '{"entries": [{"address": "http://localhost:9001/3.0/addresses/newowner@example.com", "delivery_mode": "regular", "email": "newowner@example.com", "http_etag": - "\"2c09b6d02e7e1d09d01b9488106d3d818dd3c3d2\"", "list_id": "foo.example.com", + "\"11ab48d88f947c27fa31e246de34e7414e74e5ac\"", "list_id": "foo.example.com", "member_id": 8, "moderation_action": "accept", "role": "owner", "self_link": - "http://localhost:9001/3.0/members/8", "user": "http://localhost:9001/3.0/users/4"}, + "http://localhost:9001/3.0/members/8", "user": "http://localhost:9001/3.0/users/8"}, {"address": "http://localhost:9001/3.0/addresses/su@example.com", "delivery_mode": - "regular", "email": "su@example.com", "http_etag": "\"f9ff27050671f86f8667afcf197da69bec2a818d\"", + "regular", "email": "su@example.com", "http_etag": "\"d6564606540aa51e459b721885361f0681b88052\"", "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/3"}], "http_etag": "\"109bb14654b14633e1feef88abc1a3746fb37995\"", + "http://localhost:9001/3.0/users/7"}], "http_etag": "\"1b0c5224232125cc46903b554d42ba882dac0661\"", "start": 0, "total_size": 2}'} headers: content-length: ['863'] @@ -463,10 +463,10 @@ uri: http://localhost:9001/3.0/lists/foo.example.com/roster/owner response: body: {string: !!python/unicode '{"entries": [{"address": "http://localhost:9001/3.0/addresses/su@example.com", - "delivery_mode": "regular", "email": "su@example.com", "http_etag": "\"f9ff27050671f86f8667afcf197da69bec2a818d\"", + "delivery_mode": "regular", "email": "su@example.com", "http_etag": "\"d6564606540aa51e459b721885361f0681b88052\"", "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/3"}], "http_etag": "\"43cc1ae5f9e7339db43f994b05ff01c12660bb2b\"", + "http://localhost:9001/3.0/users/7"}], "http_etag": "\"5dafdb1115e0ceb4d5c5f5745c9973d16703682a\"", "start": 0, "total_size": 1}'} headers: content-length: ['477'] diff --git a/src/postorius/tests/fixtures/vcr_cassettes/DomainCreationTest.test_new_domain_created_with_owner.yaml b/src/postorius/tests/fixtures/vcr_cassettes/DomainCreationTest.test_new_domain_created_with_owner.yaml index 183a173..8d8fa2f 100644 --- a/src/postorius/tests/fixtures/vcr_cassettes/DomainCreationTest.test_new_domain_created_with_owner.yaml +++ b/src/postorius/tests/fixtures/vcr_cassettes/DomainCreationTest.test_new_domain_created_with_owner.yaml @@ -32,10 +32,10 @@ uri: http://localhost:9001/3.0/users/su@example.com response: body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag": - "\"1479b23f4b3c2af04f98946e313297006dd20754\"", "is_server_owner": false, - "self_link": "http://localhost:9001/3.0/users/27", "user_id": 27}'} + "\"82f042707bad8528d367f38ace98ee0d7ff05e57\"", "is_server_owner": false, + "self_link": "http://localhost:9001/3.0/users/107", "user_id": 107}'} headers: - content-length: ['190'] + content-length: ['192'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -43,15 +43,15 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode GET - uri: http://localhost:9001/3.0/users/27/addresses + uri: http://localhost:9001/3.0/users/107/addresses response: body: {string: !!python/unicode '{"entries": [{"email": "su@example.com", "http_etag": - "\"9210a0ce3a86784179e843000a09844024fb03b4\"", "original_email": "su@example.com", + "\"0a9acce49bac565c4c9a6f82cbfa1071cf8431f9\"", "original_email": "su@example.com", "registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/su@example.com", - "user": "http://localhost:9001/3.0/users/27"}], "http_etag": "\"7684bfa20597c2d46932d3e54dd1df213fb86c45\"", + "user": "http://localhost:9001/3.0/users/107"}], "http_etag": "\"3b2c12fee9e1570dd7a25f21b1bfa834bc650689\"", "start": 0, "total_size": 1}'} headers: - content-length: ['382'] + content-length: ['383'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -123,12 +123,12 @@ uri: http://localhost:9001/3.0/domains/example.com/owners response: body: {string: !!python/unicode '{"entries": [{"created_on": "2005-08-01T07:49:23", - "http_etag": "\"1479b23f4b3c2af04f98946e313297006dd20754\"", "is_server_owner": - false, "self_link": "http://localhost:9001/3.0/users/27", "user_id": 27}], - "http_etag": "\"9d1023d335295f1831343138000cb9907c9a78d8\"", "start": 0, "total_size": + "http_etag": "\"82f042707bad8528d367f38ace98ee0d7ff05e57\"", "is_server_owner": + false, "self_link": "http://localhost:9001/3.0/users/107", "user_id": 107}], + "http_etag": "\"626cd7e8adb007ccfba5661536ba21d5aeb4209f\"", "start": 0, "total_size": 1}'} headers: - content-length: ['295'] + content-length: ['297'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -139,10 +139,10 @@ uri: http://localhost:9001/3.0/users/su@example.com response: body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag": - "\"1479b23f4b3c2af04f98946e313297006dd20754\"", "is_server_owner": false, - "self_link": "http://localhost:9001/3.0/users/27", "user_id": 27}'} + "\"82f042707bad8528d367f38ace98ee0d7ff05e57\"", "is_server_owner": false, + "self_link": "http://localhost:9001/3.0/users/107", "user_id": 107}'} headers: - content-length: ['190'] + content-length: ['192'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -160,12 +160,40 @@ body: null headers: accept-encoding: ['gzip, deflate'] - method: !!python/unicode DELETE - uri: http://localhost:9001/3.0/domains/example.com + method: !!python/unicode GET + uri: http://localhost:9001/3.0/domains response: - body: {string: !!python/unicode 404 Not Found} + body: {string: !!python/unicode '{"http_etag": "\"32223434a0f3af4cdc4673d1fbc5bac1f6d98fd3\"", + "start": 0, "total_size": 0}'} headers: - content-length: ['13'] + content-length: ['90'] content-type: [application/json; charset=utf-8] - status: {code: 404, message: Not Found} + status: {code: 200, message: OK} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + method: !!python/unicode GET + uri: http://localhost:9001/3.0/users + response: + body: {string: !!python/unicode '{"entries": [{"created_on": "2005-08-01T07:49:23", + "http_etag": "\"82f042707bad8528d367f38ace98ee0d7ff05e57\"", "is_server_owner": + false, "self_link": "http://localhost:9001/3.0/users/107", "user_id": 107}], + "http_etag": "\"626cd7e8adb007ccfba5661536ba21d5aeb4209f\"", "start": 0, "total_size": + 1}'} + headers: + content-length: ['297'] + 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/107 + response: + body: {string: !!python/unicode ''} + headers: + content-length: ['0'] + status: {code: 204, message: No Content} version: 1 diff --git a/src/postorius/tests/fixtures/vcr_cassettes/DomainCreationTest.test_permission_denied.yaml b/src/postorius/tests/fixtures/vcr_cassettes/DomainCreationTest.test_permission_denied.yaml index 30eaaba..cbe1f77 100644 --- a/src/postorius/tests/fixtures/vcr_cassettes/DomainCreationTest.test_permission_denied.yaml +++ b/src/postorius/tests/fixtures/vcr_cassettes/DomainCreationTest.test_permission_denied.yaml @@ -27,12 +27,26 @@ body: null headers: accept-encoding: ['gzip, deflate'] - method: !!python/unicode DELETE - uri: http://localhost:9001/3.0/domains/example.com + method: !!python/unicode GET + uri: http://localhost:9001/3.0/domains response: - body: {string: !!python/unicode 404 Not Found} + body: {string: !!python/unicode '{"http_etag": "\"32223434a0f3af4cdc4673d1fbc5bac1f6d98fd3\"", + "start": 0, "total_size": 0}'} headers: - content-length: ['13'] + content-length: ['90'] content-type: [application/json; charset=utf-8] - status: {code: 404, message: Not Found} + status: {code: 200, message: OK} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + method: !!python/unicode GET + uri: http://localhost:9001/3.0/users + 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} version: 1 diff --git a/src/postorius/tests/fixtures/vcr_cassettes/DomainDeleteTest.test_access_anonymous.yaml b/src/postorius/tests/fixtures/vcr_cassettes/DomainDeleteTest.test_access_anonymous.yaml index d5aadf4..6c80e5d 100644 --- a/src/postorius/tests/fixtures/vcr_cassettes/DomainDeleteTest.test_access_anonymous.yaml +++ b/src/postorius/tests/fixtures/vcr_cassettes/DomainDeleteTest.test_access_anonymous.yaml @@ -85,6 +85,22 @@ body: null headers: accept-encoding: ['gzip, deflate'] + method: !!python/unicode GET + uri: http://localhost:9001/3.0/domains + response: + body: {string: !!python/unicode '{"entries": [{"base_url": "http://example.com", + "description": null, "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", + "mail_host": "example.com", "self_link": "http://localhost:9001/3.0/domains/example.com", + "url_host": "example.com"}], "http_etag": "\"c385b155f8da284bf78dbe075e20f58a30c893ab\"", + "start": 0, "total_size": 1}'} + headers: + content-length: ['338'] + 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/domains/example.com response: @@ -92,4 +108,44 @@ 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 + response: + body: {string: !!python/unicode '{"entries": [{"created_on": "2005-08-01T07:49:23", + "http_etag": "\"cbdda1bcd01756e0b9654f511f969d9c0db788c7\"", "is_server_owner": + false, "self_link": "http://localhost:9001/3.0/users/56", "user_id": 56}, + {"created_on": "2005-08-01T07:49:23", "http_etag": "\"a0047420445e969e94930347b9942e863350bcd2\"", + "is_server_owner": false, "self_link": "http://localhost:9001/3.0/users/57", + "user_id": 57}], "http_etag": "\"45af7ef5613e03c30a12f5c8f442d250579be691\"", + "start": 0, "total_size": 2}'} + headers: + content-length: ['487'] + 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/56 + 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/57 + response: + body: {string: !!python/unicode ''} + headers: + content-length: ['0'] + status: {code: 204, message: No Content} version: 1 diff --git a/src/postorius/tests/fixtures/vcr_cassettes/DomainDeleteTest.test_access_basic_user.yaml b/src/postorius/tests/fixtures/vcr_cassettes/DomainDeleteTest.test_access_basic_user.yaml index 46094c0..6a06a28 100644 --- a/src/postorius/tests/fixtures/vcr_cassettes/DomainDeleteTest.test_access_basic_user.yaml +++ b/src/postorius/tests/fixtures/vcr_cassettes/DomainDeleteTest.test_access_basic_user.yaml @@ -109,6 +109,22 @@ body: null headers: accept-encoding: ['gzip, deflate'] + method: !!python/unicode GET + uri: http://localhost:9001/3.0/domains + response: + body: {string: !!python/unicode '{"entries": [{"base_url": "http://example.com", + "description": null, "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", + "mail_host": "example.com", "self_link": "http://localhost:9001/3.0/domains/example.com", + "url_host": "example.com"}], "http_etag": "\"c385b155f8da284bf78dbe075e20f58a30c893ab\"", + "start": 0, "total_size": 1}'} + headers: + content-length: ['338'] + 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/domains/example.com response: @@ -116,4 +132,44 @@ 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 + response: + body: {string: !!python/unicode '{"entries": [{"created_on": "2005-08-01T07:49:23", + "http_etag": "\"132e9119809986bfb1a371e9b8548ddb69655407\"", "is_server_owner": + false, "self_link": "http://localhost:9001/3.0/users/58", "user_id": 58}, + {"created_on": "2005-08-01T07:49:23", "http_etag": "\"a0a537fff1aaea3eb7a9eb7a6abfae830eff26c0\"", + "is_server_owner": false, "self_link": "http://localhost:9001/3.0/users/59", + "user_id": 59}], "http_etag": "\"de436d71fedfa1724000b138b2336ab3971bcc13\"", + "start": 0, "total_size": 2}'} + headers: + content-length: ['487'] + 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/58 + 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/59 + response: + body: {string: !!python/unicode ''} + headers: + content-length: ['0'] + status: {code: 204, message: No Content} version: 1 diff --git a/src/postorius/tests/fixtures/vcr_cassettes/DomainDeleteTest.test_access_moderators.yaml b/src/postorius/tests/fixtures/vcr_cassettes/DomainDeleteTest.test_access_moderators.yaml index dd5b2c0..1c93a78 100644 --- a/src/postorius/tests/fixtures/vcr_cassettes/DomainDeleteTest.test_access_moderators.yaml +++ b/src/postorius/tests/fixtures/vcr_cassettes/DomainDeleteTest.test_access_moderators.yaml @@ -89,10 +89,10 @@ uri: http://localhost:9001/3.0/users/moderator@example.com response: body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag": - "\"c7360c029a83c97672ca38dd8b008d48e05949a6\"", "is_server_owner": false, - "self_link": "http://localhost:9001/3.0/users/7", "user_id": 7}'} + "\"1c60ef8b0c095eafe42cc79e85750834e6f25739\"", "is_server_owner": false, + "self_link": "http://localhost:9001/3.0/users/61", "user_id": 61}'} headers: - content-length: ['188'] + content-length: ['190'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -100,16 +100,16 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode GET - uri: http://localhost:9001/3.0/users/7/addresses + uri: http://localhost:9001/3.0/users/61/addresses response: body: {string: !!python/unicode '{"entries": [{"email": "moderator@example.com", - "http_etag": "\"dc9e6ab7f685df3bdee82a1b48abcc345c24c317\"", "original_email": + "http_etag": "\"30a97a6a4bc4f18a15355c9310060d433a389dc9\"", "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/7"}], - "http_etag": "\"61e6b2b734fab9e85bac3022e2728ddca6d73b95\"", "start": 0, "total_size": + "http://localhost:9001/3.0/addresses/moderator@example.com", "user": "http://localhost:9001/3.0/users/61"}], + "http_etag": "\"28446812cdce32b2c964848946e1ab8e2a471447\"", "start": 0, "total_size": 1}'} headers: - content-length: ['402'] + content-length: ['403'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -120,10 +120,10 @@ uri: http://localhost:9001/3.0/users/moderator@example.com response: body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag": - "\"c7360c029a83c97672ca38dd8b008d48e05949a6\"", "is_server_owner": false, - "self_link": "http://localhost:9001/3.0/users/7", "user_id": 7}'} + "\"1c60ef8b0c095eafe42cc79e85750834e6f25739\"", "is_server_owner": false, + "self_link": "http://localhost:9001/3.0/users/61", "user_id": 61}'} headers: - content-length: ['188'] + content-length: ['190'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -131,16 +131,32 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode GET - uri: http://localhost:9001/3.0/users/7/addresses + uri: http://localhost:9001/3.0/users/61/addresses response: body: {string: !!python/unicode '{"entries": [{"email": "moderator@example.com", - "http_etag": "\"dc9e6ab7f685df3bdee82a1b48abcc345c24c317\"", "original_email": + "http_etag": "\"30a97a6a4bc4f18a15355c9310060d433a389dc9\"", "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/7"}], - "http_etag": "\"61e6b2b734fab9e85bac3022e2728ddca6d73b95\"", "start": 0, "total_size": + "http://localhost:9001/3.0/addresses/moderator@example.com", "user": "http://localhost:9001/3.0/users/61"}], + "http_etag": "\"28446812cdce32b2c964848946e1ab8e2a471447\"", "start": 0, "total_size": 1}'} headers: - content-length: ['402'] + content-length: ['403'] + 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/domains + response: + body: {string: !!python/unicode '{"entries": [{"base_url": "http://example.com", + "description": null, "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", + "mail_host": "example.com", "self_link": "http://localhost:9001/3.0/domains/example.com", + "url_host": "example.com"}], "http_etag": "\"c385b155f8da284bf78dbe075e20f58a30c893ab\"", + "start": 0, "total_size": 1}'} + headers: + content-length: ['338'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -154,4 +170,44 @@ 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 + response: + body: {string: !!python/unicode '{"entries": [{"created_on": "2005-08-01T07:49:23", + "http_etag": "\"de1e4c89e338b15e8968d576d8687c538471c14c\"", "is_server_owner": + false, "self_link": "http://localhost:9001/3.0/users/60", "user_id": 60}, + {"created_on": "2005-08-01T07:49:23", "http_etag": "\"1c60ef8b0c095eafe42cc79e85750834e6f25739\"", + "is_server_owner": false, "self_link": "http://localhost:9001/3.0/users/61", + "user_id": 61}], "http_etag": "\"b8906d0fbeec09102cb106bc0208f448babb9ab6\"", + "start": 0, "total_size": 2}'} + headers: + content-length: ['487'] + 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/60 + 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/61 + response: + body: {string: !!python/unicode ''} + headers: + content-length: ['0'] + status: {code: 204, message: No Content} version: 1 diff --git a/src/postorius/tests/fixtures/vcr_cassettes/DomainDeleteTest.test_access_owners.yaml b/src/postorius/tests/fixtures/vcr_cassettes/DomainDeleteTest.test_access_owners.yaml index 391a0b1..2e72353 100644 --- a/src/postorius/tests/fixtures/vcr_cassettes/DomainDeleteTest.test_access_owners.yaml +++ b/src/postorius/tests/fixtures/vcr_cassettes/DomainDeleteTest.test_access_owners.yaml @@ -89,10 +89,10 @@ uri: http://localhost:9001/3.0/users/owner@example.com response: body: {string: !!python/unicode '{"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}'} + "\"f4c118620518f77057364d55ff3113d1e549d5fd\"", "is_server_owner": false, + "self_link": "http://localhost:9001/3.0/users/62", "user_id": 62}'} headers: - content-length: ['188'] + content-length: ['190'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -100,15 +100,15 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode GET - uri: http://localhost:9001/3.0/users/6/addresses + uri: http://localhost:9001/3.0/users/62/addresses response: body: {string: !!python/unicode '{"entries": [{"email": "owner@example.com", "http_etag": - "\"7efeccdd4edd0bed02cd2141365a115239f83be4\"", "original_email": "owner@example.com", + "\"3cb10fc2befec8a18b69aaf944f4231e32e65f36\"", "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/6"}], "http_etag": "\"a565f7d323e0a6ca5da35f6d965148fe4fe03fbb\"", + "user": "http://localhost:9001/3.0/users/62"}], "http_etag": "\"dd53c1192b2a1d4f65d666c1501d54b56b1c218c\"", "start": 0, "total_size": 1}'} headers: - content-length: ['390'] + content-length: ['391'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -119,10 +119,10 @@ uri: http://localhost:9001/3.0/users/owner@example.com response: body: {string: !!python/unicode '{"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}'} + "\"f4c118620518f77057364d55ff3113d1e549d5fd\"", "is_server_owner": false, + "self_link": "http://localhost:9001/3.0/users/62", "user_id": 62}'} headers: - content-length: ['188'] + content-length: ['190'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -130,15 +130,31 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode GET - uri: http://localhost:9001/3.0/users/6/addresses + uri: http://localhost:9001/3.0/users/62/addresses response: body: {string: !!python/unicode '{"entries": [{"email": "owner@example.com", "http_etag": - "\"7efeccdd4edd0bed02cd2141365a115239f83be4\"", "original_email": "owner@example.com", + "\"3cb10fc2befec8a18b69aaf944f4231e32e65f36\"", "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/6"}], "http_etag": "\"a565f7d323e0a6ca5da35f6d965148fe4fe03fbb\"", + "user": "http://localhost:9001/3.0/users/62"}], "http_etag": "\"dd53c1192b2a1d4f65d666c1501d54b56b1c218c\"", "start": 0, "total_size": 1}'} headers: - content-length: ['390'] + content-length: ['391'] + 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/domains + response: + body: {string: !!python/unicode '{"entries": [{"base_url": "http://example.com", + "description": null, "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", + "mail_host": "example.com", "self_link": "http://localhost:9001/3.0/domains/example.com", + "url_host": "example.com"}], "http_etag": "\"c385b155f8da284bf78dbe075e20f58a30c893ab\"", + "start": 0, "total_size": 1}'} + headers: + content-length: ['338'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -152,4 +168,44 @@ 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 + response: + body: {string: !!python/unicode '{"entries": [{"created_on": "2005-08-01T07:49:23", + "http_etag": "\"f4c118620518f77057364d55ff3113d1e549d5fd\"", "is_server_owner": + false, "self_link": "http://localhost:9001/3.0/users/62", "user_id": 62}, + {"created_on": "2005-08-01T07:49:23", "http_etag": "\"5412b1d994bc41ce564922865c91ec9909f8952f\"", + "is_server_owner": false, "self_link": "http://localhost:9001/3.0/users/63", + "user_id": 63}], "http_etag": "\"221f5bbf22a6c760954a96adadca27fad049a02a\"", + "start": 0, "total_size": 2}'} + headers: + content-length: ['487'] + 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/62 + 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/63 + response: + body: {string: !!python/unicode ''} + headers: + content-length: ['0'] + status: {code: 204, message: No Content} version: 1 diff --git a/src/postorius/tests/fixtures/vcr_cassettes/DomainDeleteTest.test_domain_delete.yaml b/src/postorius/tests/fixtures/vcr_cassettes/DomainDeleteTest.test_domain_delete.yaml index e340ec9..331091a 100644 --- a/src/postorius/tests/fixtures/vcr_cassettes/DomainDeleteTest.test_domain_delete.yaml +++ b/src/postorius/tests/fixtures/vcr_cassettes/DomainDeleteTest.test_domain_delete.yaml @@ -88,29 +88,11 @@ method: !!python/unicode GET uri: http://localhost:9001/3.0/users/su@example.com response: - body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag": - "\"bb1c2e6094a96b17e2d5dbf487291f7667f69f75\"", "is_server_owner": false, - "self_link": "http://localhost:9001/3.0/users/3", "user_id": 3}'} + body: {string: !!python/unicode 404 Not Found} headers: - content-length: ['188'] + content-length: ['13'] 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/3/addresses - response: - body: {string: !!python/unicode '{"entries": [{"email": "su@example.com", "http_etag": - "\"91c297417f4c33cf707148d031e79b6cb316f158\"", "original_email": "su@example.com", - "registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/su@example.com", - "user": "http://localhost:9001/3.0/users/3"}], "http_etag": "\"e9a7c409726b93f93aaf643fce49558cf27237e1\"", - "start": 0, "total_size": 1}'} - headers: - content-length: ['381'] - content-type: [application/json; charset=utf-8] - status: {code: 200, message: OK} + status: {code: 404, message: Not Found} - request: body: null headers: @@ -129,29 +111,11 @@ method: !!python/unicode GET uri: http://localhost:9001/3.0/users/su@example.com response: - body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag": - "\"bb1c2e6094a96b17e2d5dbf487291f7667f69f75\"", "is_server_owner": false, - "self_link": "http://localhost:9001/3.0/users/3", "user_id": 3}'} + body: {string: !!python/unicode 404 Not Found} headers: - content-length: ['188'] + content-length: ['13'] 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/3/addresses - response: - body: {string: !!python/unicode '{"entries": [{"email": "su@example.com", "http_etag": - "\"91c297417f4c33cf707148d031e79b6cb316f158\"", "original_email": "su@example.com", - "registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/su@example.com", - "user": "http://localhost:9001/3.0/users/3"}], "http_etag": "\"e9a7c409726b93f93aaf643fce49558cf27237e1\"", - "start": 0, "total_size": 1}'} - headers: - content-length: ['381'] - content-type: [application/json; charset=utf-8] - status: {code: 200, message: OK} + status: {code: 404, message: Not Found} - request: body: null headers: @@ -195,12 +159,53 @@ body: null headers: accept-encoding: ['gzip, deflate'] - method: !!python/unicode DELETE - uri: http://localhost:9001/3.0/domains/example.com + method: !!python/unicode GET + uri: http://localhost:9001/3.0/domains response: - body: {string: !!python/unicode 404 Not Found} + body: {string: !!python/unicode '{"http_etag": "\"32223434a0f3af4cdc4673d1fbc5bac1f6d98fd3\"", + "start": 0, "total_size": 0}'} headers: - content-length: ['13'] + content-length: ['90'] content-type: [application/json; charset=utf-8] - status: {code: 404, message: Not Found} + status: {code: 200, message: OK} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + method: !!python/unicode GET + uri: http://localhost:9001/3.0/users + response: + body: {string: !!python/unicode '{"entries": [{"created_on": "2005-08-01T07:49:23", + "http_etag": "\"4405ea4e8786e154d63546c973dcc73b51a2ad56\"", "is_server_owner": + false, "self_link": "http://localhost:9001/3.0/users/64", "user_id": 64}, + {"created_on": "2005-08-01T07:49:23", "http_etag": "\"eac05161a72ee0876a709658d291d4371574fe41\"", + "is_server_owner": false, "self_link": "http://localhost:9001/3.0/users/65", + "user_id": 65}], "http_etag": "\"2a66ed0ce88225be58f2c4fa951851856a3bbe62\"", + "start": 0, "total_size": 2}'} + headers: + content-length: ['487'] + 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/64 + 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/65 + response: + body: {string: !!python/unicode ''} + headers: + content-length: ['0'] + status: {code: 204, message: No Content} version: 1 diff --git a/src/postorius/tests/fixtures/vcr_cassettes/DomainDeleteTest.test_domain_delete_confirm.yaml b/src/postorius/tests/fixtures/vcr_cassettes/DomainDeleteTest.test_domain_delete_confirm.yaml index 50e1558..d6bd0db 100644 --- a/src/postorius/tests/fixtures/vcr_cassettes/DomainDeleteTest.test_domain_delete_confirm.yaml +++ b/src/postorius/tests/fixtures/vcr_cassettes/DomainDeleteTest.test_domain_delete_confirm.yaml @@ -88,29 +88,11 @@ method: !!python/unicode GET uri: http://localhost:9001/3.0/users/su@example.com response: - body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag": - "\"bb1c2e6094a96b17e2d5dbf487291f7667f69f75\"", "is_server_owner": false, - "self_link": "http://localhost:9001/3.0/users/3", "user_id": 3}'} + body: {string: !!python/unicode 404 Not Found} headers: - content-length: ['188'] + content-length: ['13'] 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/3/addresses - response: - body: {string: !!python/unicode '{"entries": [{"email": "su@example.com", "http_etag": - "\"91c297417f4c33cf707148d031e79b6cb316f158\"", "original_email": "su@example.com", - "registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/su@example.com", - "user": "http://localhost:9001/3.0/users/3"}], "http_etag": "\"e9a7c409726b93f93aaf643fce49558cf27237e1\"", - "start": 0, "total_size": 1}'} - headers: - content-length: ['381'] - content-type: [application/json; charset=utf-8] - status: {code: 200, message: OK} + status: {code: 404, message: Not Found} - request: body: null headers: @@ -148,6 +130,22 @@ body: null headers: accept-encoding: ['gzip, deflate'] + method: !!python/unicode GET + uri: http://localhost:9001/3.0/domains + response: + body: {string: !!python/unicode '{"entries": [{"base_url": "http://example.com", + "description": null, "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", + "mail_host": "example.com", "self_link": "http://localhost:9001/3.0/domains/example.com", + "url_host": "example.com"}], "http_etag": "\"c385b155f8da284bf78dbe075e20f58a30c893ab\"", + "start": 0, "total_size": 1}'} + headers: + content-length: ['338'] + 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/domains/example.com response: @@ -155,4 +153,44 @@ 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 + response: + body: {string: !!python/unicode '{"entries": [{"created_on": "2005-08-01T07:49:23", + "http_etag": "\"0a53b06deb9b78ed4cdfa9b249ec3f8a688ba2ab\"", "is_server_owner": + false, "self_link": "http://localhost:9001/3.0/users/66", "user_id": 66}, + {"created_on": "2005-08-01T07:49:23", "http_etag": "\"8f98b174e9b917748477c21a7ffd7b01a635caa8\"", + "is_server_owner": false, "self_link": "http://localhost:9001/3.0/users/67", + "user_id": 67}], "http_etag": "\"01da68868a5b69d38d6b034113f61a82b8ccc63e\"", + "start": 0, "total_size": 2}'} + headers: + content-length: ['487'] + 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/66 + 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/67 + response: + body: {string: !!python/unicode ''} + headers: + content-length: ['0'] + status: {code: 204, message: No Content} version: 1 diff --git a/src/postorius/tests/fixtures/vcr_cassettes/DomainIndexPageTest.test_domain_index_contains_the_domains.yaml b/src/postorius/tests/fixtures/vcr_cassettes/DomainIndexPageTest.test_domain_index_contains_the_domains.yaml index 1b20571..0a64e9e 100644 --- a/src/postorius/tests/fixtures/vcr_cassettes/DomainIndexPageTest.test_domain_index_contains_the_domains.yaml +++ b/src/postorius/tests/fixtures/vcr_cassettes/DomainIndexPageTest.test_domain_index_contains_the_domains.yaml @@ -128,8 +128,53 @@ body: null headers: accept-encoding: ['gzip, deflate'] + method: !!python/unicode GET + uri: http://localhost:9001/3.0/domains + response: + body: {string: !!python/unicode '{"entries": [{"base_url": "http://example.com", + "description": null, "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", + "mail_host": "example.com", "self_link": "http://localhost:9001/3.0/domains/example.com", + "url_host": "example.com"}], "http_etag": "\"c385b155f8da284bf78dbe075e20f58a30c893ab\"", + "start": 0, "total_size": 1}'} + headers: + content-length: ['338'] + content-type: [application/json; charset=utf-8] + status: {code: 200, message: OK} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] method: !!python/unicode DELETE - uri: http://localhost:9001/3.0/lists/foo@example.com + uri: http://localhost:9001/3.0/domains/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 + response: + body: {string: !!python/unicode '{"entries": [{"created_on": "2005-08-01T07:49:23", + "http_etag": "\"555b99ba1fd97d57b3489c51824a186de671c3b2\"", "is_server_owner": + false, "self_link": "http://localhost:9001/3.0/users/97", "user_id": 97}, + {"created_on": "2005-08-01T07:49:23", "http_etag": "\"e2fe0559627f5c61596e6c67563791138130b815\"", + "is_server_owner": false, "self_link": "http://localhost:9001/3.0/users/98", + "user_id": 98}], "http_etag": "\"fd9dc97913f8b2aadbae3f693538063a2572a522\"", + "start": 0, "total_size": 2}'} + headers: + content-length: ['487'] + 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/97 response: body: {string: !!python/unicode ''} headers: @@ -140,7 +185,7 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode DELETE - uri: http://localhost:9001/3.0/domains/example.com + uri: http://localhost:9001/3.0/users/98 response: body: {string: !!python/unicode ''} headers: diff --git a/src/postorius/tests/fixtures/vcr_cassettes/DomainIndexPageTest.test_domain_index_not_accessible_to_moderators.yaml b/src/postorius/tests/fixtures/vcr_cassettes/DomainIndexPageTest.test_domain_index_not_accessible_to_moderators.yaml index 97bf30b..db0378c 100644 --- a/src/postorius/tests/fixtures/vcr_cassettes/DomainIndexPageTest.test_domain_index_not_accessible_to_moderators.yaml +++ b/src/postorius/tests/fixtures/vcr_cassettes/DomainIndexPageTest.test_domain_index_not_accessible_to_moderators.yaml @@ -89,10 +89,10 @@ uri: http://localhost:9001/3.0/users/moderator@example.com response: body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag": - "\"c73be856843a113d5eb32f60ae4315192adb1045\"", "is_server_owner": false, - "self_link": "http://localhost:9001/3.0/users/26", "user_id": 26}'} + "\"0ca6fb9eadc69fead7a12f149232ec08302bb657\"", "is_server_owner": false, + "self_link": "http://localhost:9001/3.0/users/100", "user_id": 100}'} headers: - content-length: ['190'] + content-length: ['192'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -100,16 +100,32 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode GET - uri: http://localhost:9001/3.0/users/26/addresses + uri: http://localhost:9001/3.0/users/100/addresses response: body: {string: !!python/unicode '{"entries": [{"email": "moderator@example.com", - "http_etag": "\"7cbfe1152b2059ea22da3fd3c63d2e80137463c9\"", "original_email": + "http_etag": "\"9e61bd22194d15c6a2408949ba890d3526be6497\"", "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/26"}], - "http_etag": "\"a5cec441151e9ebbdeecd1a5dfa2bc4442606b23\"", "start": 0, "total_size": + "http://localhost:9001/3.0/addresses/moderator@example.com", "user": "http://localhost:9001/3.0/users/100"}], + "http_etag": "\"b1589bcff630b24e500df1a6c3619f6d2b67abb9\"", "start": 0, "total_size": 1}'} headers: - content-length: ['403'] + content-length: ['404'] + 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/domains + response: + body: {string: !!python/unicode '{"entries": [{"base_url": "http://example.com", + "description": null, "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", + "mail_host": "example.com", "self_link": "http://localhost:9001/3.0/domains/example.com", + "url_host": "example.com"}], "http_etag": "\"c385b155f8da284bf78dbe075e20f58a30c893ab\"", + "start": 0, "total_size": 1}'} + headers: + content-length: ['338'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -117,7 +133,36 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode DELETE - uri: http://localhost:9001/3.0/lists/foo@example.com + uri: http://localhost:9001/3.0/domains/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 + response: + body: {string: !!python/unicode '{"entries": [{"created_on": "2005-08-01T07:49:23", + "http_etag": "\"ec55d543b49cca522faa128968b2565a98fca8d0\"", "is_server_owner": + false, "self_link": "http://localhost:9001/3.0/users/99", "user_id": 99}, + {"created_on": "2005-08-01T07:49:23", "http_etag": "\"0ca6fb9eadc69fead7a12f149232ec08302bb657\"", + "is_server_owner": false, "self_link": "http://localhost:9001/3.0/users/100", + "user_id": 100}], "http_etag": "\"8484f056095d02faebed11b0e07ac598f413dcc8\"", + "start": 0, "total_size": 2}'} + headers: + content-length: ['489'] + content-type: [application/json; charset=utf-8] + status: {code: 200, message: OK} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + method: !!python/unicode DELETE + uri: http://localhost:9001/3.0/users/100 response: body: {string: !!python/unicode ''} headers: @@ -128,7 +173,7 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode DELETE - uri: http://localhost:9001/3.0/domains/example.com + uri: http://localhost:9001/3.0/users/99 response: body: {string: !!python/unicode ''} headers: diff --git a/src/postorius/tests/fixtures/vcr_cassettes/DomainIndexPageTest.test_domain_index_not_accessible_to_owners.yaml b/src/postorius/tests/fixtures/vcr_cassettes/DomainIndexPageTest.test_domain_index_not_accessible_to_owners.yaml index 0194483..985bdfb 100644 --- a/src/postorius/tests/fixtures/vcr_cassettes/DomainIndexPageTest.test_domain_index_not_accessible_to_owners.yaml +++ b/src/postorius/tests/fixtures/vcr_cassettes/DomainIndexPageTest.test_domain_index_not_accessible_to_owners.yaml @@ -89,10 +89,10 @@ uri: http://localhost:9001/3.0/users/owner@example.com response: body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag": - "\"0c3f6e8712fd05b9da49c42bf9600a5414b7958f\"", "is_server_owner": false, - "self_link": "http://localhost:9001/3.0/users/25", "user_id": 25}'} + "\"db5579cd27bf13f658fc8d9cab271667a51d8625\"", "is_server_owner": false, + "self_link": "http://localhost:9001/3.0/users/101", "user_id": 101}'} headers: - content-length: ['190'] + content-length: ['192'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -100,15 +100,31 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode GET - uri: http://localhost:9001/3.0/users/25/addresses + uri: http://localhost:9001/3.0/users/101/addresses response: body: {string: !!python/unicode '{"entries": [{"email": "owner@example.com", "http_etag": - "\"4f9ed9a34230bdffba99ba04babc875b8ca84412\"", "original_email": "owner@example.com", + "\"559e7e834a70bb3263f48dedabdd7868fe098681\"", "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/25"}], "http_etag": "\"f2cf8f57c20919fb8d58ac30d9a21fdf04707fd0\"", + "user": "http://localhost:9001/3.0/users/101"}], "http_etag": "\"ef507f3609c363d57dc7fa34a4cf72a03ec7ea25\"", "start": 0, "total_size": 1}'} headers: - content-length: ['391'] + content-length: ['392'] + 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/domains + response: + body: {string: !!python/unicode '{"entries": [{"base_url": "http://example.com", + "description": null, "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", + "mail_host": "example.com", "self_link": "http://localhost:9001/3.0/domains/example.com", + "url_host": "example.com"}], "http_etag": "\"c385b155f8da284bf78dbe075e20f58a30c893ab\"", + "start": 0, "total_size": 1}'} + headers: + content-length: ['338'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -116,7 +132,36 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode DELETE - uri: http://localhost:9001/3.0/lists/foo@example.com + uri: http://localhost:9001/3.0/domains/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 + response: + body: {string: !!python/unicode '{"entries": [{"created_on": "2005-08-01T07:49:23", + "http_etag": "\"db5579cd27bf13f658fc8d9cab271667a51d8625\"", "is_server_owner": + false, "self_link": "http://localhost:9001/3.0/users/101", "user_id": 101}, + {"created_on": "2005-08-01T07:49:23", "http_etag": "\"4719f322df75c491190b1cd03895920321a6b274\"", + "is_server_owner": false, "self_link": "http://localhost:9001/3.0/users/102", + "user_id": 102}], "http_etag": "\"dc11c47a3c4e58d5af2afdea0e198003da164e8f\"", + "start": 0, "total_size": 2}'} + headers: + content-length: ['491'] + 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/101 response: body: {string: !!python/unicode ''} headers: @@ -127,7 +172,7 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode DELETE - uri: http://localhost:9001/3.0/domains/example.com + uri: http://localhost:9001/3.0/users/102 response: body: {string: !!python/unicode ''} headers: diff --git a/src/postorius/tests/fixtures/vcr_cassettes/DomainIndexPageTest.test_domain_index_not_accessible_to_public.yaml b/src/postorius/tests/fixtures/vcr_cassettes/DomainIndexPageTest.test_domain_index_not_accessible_to_public.yaml index 22f4edd..6982bf0 100644 --- a/src/postorius/tests/fixtures/vcr_cassettes/DomainIndexPageTest.test_domain_index_not_accessible_to_public.yaml +++ b/src/postorius/tests/fixtures/vcr_cassettes/DomainIndexPageTest.test_domain_index_not_accessible_to_public.yaml @@ -85,8 +85,53 @@ body: null headers: accept-encoding: ['gzip, deflate'] + method: !!python/unicode GET + uri: http://localhost:9001/3.0/domains + response: + body: {string: !!python/unicode '{"entries": [{"base_url": "http://example.com", + "description": null, "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", + "mail_host": "example.com", "self_link": "http://localhost:9001/3.0/domains/example.com", + "url_host": "example.com"}], "http_etag": "\"c385b155f8da284bf78dbe075e20f58a30c893ab\"", + "start": 0, "total_size": 1}'} + headers: + content-length: ['338'] + content-type: [application/json; charset=utf-8] + status: {code: 200, message: OK} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] method: !!python/unicode DELETE - uri: http://localhost:9001/3.0/lists/foo@example.com + uri: http://localhost:9001/3.0/domains/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 + response: + body: {string: !!python/unicode '{"entries": [{"created_on": "2005-08-01T07:49:23", + "http_etag": "\"5a4ce9224fc8e1c786dcbf090938bc77b2432895\"", "is_server_owner": + false, "self_link": "http://localhost:9001/3.0/users/103", "user_id": 103}, + {"created_on": "2005-08-01T07:49:23", "http_etag": "\"770836ceecd2d678acb71744905fc6dca5b658fc\"", + "is_server_owner": false, "self_link": "http://localhost:9001/3.0/users/104", + "user_id": 104}], "http_etag": "\"0a895f81a651a1af39e92837796237366722fca7\"", + "start": 0, "total_size": 2}'} + headers: + content-length: ['491'] + 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/103 response: body: {string: !!python/unicode ''} headers: @@ -97,7 +142,7 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode DELETE - uri: http://localhost:9001/3.0/domains/example.com + uri: http://localhost:9001/3.0/users/104 response: body: {string: !!python/unicode ''} headers: diff --git a/src/postorius/tests/fixtures/vcr_cassettes/DomainIndexPageTest.test_domain_index_not_accessible_to_unpriveleged_user.yaml b/src/postorius/tests/fixtures/vcr_cassettes/DomainIndexPageTest.test_domain_index_not_accessible_to_unpriveleged_user.yaml index 499be74..3134182 100644 --- a/src/postorius/tests/fixtures/vcr_cassettes/DomainIndexPageTest.test_domain_index_not_accessible_to_unpriveleged_user.yaml +++ b/src/postorius/tests/fixtures/vcr_cassettes/DomainIndexPageTest.test_domain_index_not_accessible_to_unpriveleged_user.yaml @@ -97,8 +97,53 @@ body: null headers: accept-encoding: ['gzip, deflate'] + method: !!python/unicode GET + uri: http://localhost:9001/3.0/domains + response: + body: {string: !!python/unicode '{"entries": [{"base_url": "http://example.com", + "description": null, "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", + "mail_host": "example.com", "self_link": "http://localhost:9001/3.0/domains/example.com", + "url_host": "example.com"}], "http_etag": "\"c385b155f8da284bf78dbe075e20f58a30c893ab\"", + "start": 0, "total_size": 1}'} + headers: + content-length: ['338'] + content-type: [application/json; charset=utf-8] + status: {code: 200, message: OK} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] method: !!python/unicode DELETE - uri: http://localhost:9001/3.0/lists/foo@example.com + uri: http://localhost:9001/3.0/domains/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 + response: + body: {string: !!python/unicode '{"entries": [{"created_on": "2005-08-01T07:49:23", + "http_etag": "\"8d25493a622e91bd954fef31af740533b170dd11\"", "is_server_owner": + false, "self_link": "http://localhost:9001/3.0/users/105", "user_id": 105}, + {"created_on": "2005-08-01T07:49:23", "http_etag": "\"a8a6b3a9c9c881d786431d76df27933f3acfb376\"", + "is_server_owner": false, "self_link": "http://localhost:9001/3.0/users/106", + "user_id": 106}], "http_etag": "\"06987c6bea3e944b89f13f984944a0d4b3ed1b4c\"", + "start": 0, "total_size": 2}'} + headers: + content-length: ['491'] + 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/105 response: body: {string: !!python/unicode ''} headers: @@ -109,7 +154,7 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode DELETE - uri: http://localhost:9001/3.0/domains/example.com + uri: http://localhost:9001/3.0/users/106 response: body: {string: !!python/unicode ''} headers: diff --git a/src/postorius/tests/fixtures/vcr_cassettes/ListBansTest.test_access_for_superuser.yaml b/src/postorius/tests/fixtures/vcr_cassettes/ListBansTest.test_access_for_superuser.yaml index 7af4095..ca6fae1 100644 --- a/src/postorius/tests/fixtures/vcr_cassettes/ListBansTest.test_access_for_superuser.yaml +++ b/src/postorius/tests/fixtures/vcr_cassettes/ListBansTest.test_access_for_superuser.yaml @@ -86,15 +86,15 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode GET - uri: http://localhost:9001/3.0/lists/test_list.example.com + uri: http://localhost:9001/3.0/domains response: - body: {string: !!python/unicode '{"display_name": "Test_list", "fqdn_listname": - "test_list@example.com", "http_etag": "\"3f02dac6cf71a3be179af5064b09ce668186e785\"", - "list_id": "test_list.example.com", "list_name": "test_list", "mail_host": - "example.com", "member_count": 0, "self_link": "http://localhost:9001/3.0/lists/test_list.example.com", - "volume": 1}'} + body: {string: !!python/unicode '{"entries": [{"base_url": "http://example.com", + "description": null, "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", + "mail_host": "example.com", "self_link": "http://localhost:9001/3.0/domains/example.com", + "url_host": "example.com"}], "http_etag": "\"c385b155f8da284bf78dbe075e20f58a30c893ab\"", + "start": 0, "total_size": 1}'} headers: - content-length: ['324'] + content-length: ['338'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -102,21 +102,23 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode DELETE - uri: http://localhost:9001/3.0/lists/test_list@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/domains/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 + 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} version: 1 diff --git a/src/postorius/tests/fixtures/vcr_cassettes/ListBansTest.test_add_ban.yaml b/src/postorius/tests/fixtures/vcr_cassettes/ListBansTest.test_add_ban.yaml index 01536ba..0f51b77 100644 --- a/src/postorius/tests/fixtures/vcr_cassettes/ListBansTest.test_add_ban.yaml +++ b/src/postorius/tests/fixtures/vcr_cassettes/ListBansTest.test_add_ban.yaml @@ -175,13 +175,18 @@ body: null headers: accept-encoding: ['gzip, deflate'] - method: !!python/unicode DELETE - uri: http://localhost:9001/3.0/lists/test_list@example.com + method: !!python/unicode GET + uri: http://localhost:9001/3.0/domains response: - body: {string: !!python/unicode ''} + body: {string: !!python/unicode '{"entries": [{"base_url": "http://example.com", + "description": null, "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", + "mail_host": "example.com", "self_link": "http://localhost:9001/3.0/domains/example.com", + "url_host": "example.com"}], "http_etag": "\"c385b155f8da284bf78dbe075e20f58a30c893ab\"", + "start": 0, "total_size": 1}'} headers: - content-length: ['0'] - status: {code: 204, message: No Content} + content-length: ['338'] + content-type: [application/json; charset=utf-8] + status: {code: 200, message: OK} - request: body: null headers: @@ -193,4 +198,17 @@ 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 + 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} version: 1 diff --git a/src/postorius/tests/fixtures/vcr_cassettes/ListBansTest.test_add_ban_duplicate.yaml b/src/postorius/tests/fixtures/vcr_cassettes/ListBansTest.test_add_ban_duplicate.yaml index 223e96a..058035c 100644 --- a/src/postorius/tests/fixtures/vcr_cassettes/ListBansTest.test_add_ban_duplicate.yaml +++ b/src/postorius/tests/fixtures/vcr_cassettes/ListBansTest.test_add_ban_duplicate.yaml @@ -188,13 +188,18 @@ body: null headers: accept-encoding: ['gzip, deflate'] - method: !!python/unicode DELETE - uri: http://localhost:9001/3.0/lists/test_list@example.com + method: !!python/unicode GET + uri: http://localhost:9001/3.0/domains response: - body: {string: !!python/unicode ''} + body: {string: !!python/unicode '{"entries": [{"base_url": "http://example.com", + "description": null, "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", + "mail_host": "example.com", "self_link": "http://localhost:9001/3.0/domains/example.com", + "url_host": "example.com"}], "http_etag": "\"c385b155f8da284bf78dbe075e20f58a30c893ab\"", + "start": 0, "total_size": 1}'} headers: - content-length: ['0'] - status: {code: 204, message: No Content} + content-length: ['338'] + content-type: [application/json; charset=utf-8] + status: {code: 200, message: OK} - request: body: null headers: @@ -206,4 +211,17 @@ 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 + 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} version: 1 diff --git a/src/postorius/tests/fixtures/vcr_cassettes/ListBansTest.test_context_contains_create_form.yaml b/src/postorius/tests/fixtures/vcr_cassettes/ListBansTest.test_context_contains_create_form.yaml index 7af4095..ca6fae1 100644 --- a/src/postorius/tests/fixtures/vcr_cassettes/ListBansTest.test_context_contains_create_form.yaml +++ b/src/postorius/tests/fixtures/vcr_cassettes/ListBansTest.test_context_contains_create_form.yaml @@ -86,15 +86,15 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode GET - uri: http://localhost:9001/3.0/lists/test_list.example.com + uri: http://localhost:9001/3.0/domains response: - body: {string: !!python/unicode '{"display_name": "Test_list", "fqdn_listname": - "test_list@example.com", "http_etag": "\"3f02dac6cf71a3be179af5064b09ce668186e785\"", - "list_id": "test_list.example.com", "list_name": "test_list", "mail_host": - "example.com", "member_count": 0, "self_link": "http://localhost:9001/3.0/lists/test_list.example.com", - "volume": 1}'} + body: {string: !!python/unicode '{"entries": [{"base_url": "http://example.com", + "description": null, "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", + "mail_host": "example.com", "self_link": "http://localhost:9001/3.0/domains/example.com", + "url_host": "example.com"}], "http_etag": "\"c385b155f8da284bf78dbe075e20f58a30c893ab\"", + "start": 0, "total_size": 1}'} headers: - content-length: ['324'] + content-length: ['338'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -102,21 +102,23 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode DELETE - uri: http://localhost:9001/3.0/lists/test_list@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/domains/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 + 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} version: 1 diff --git a/src/postorius/tests/fixtures/vcr_cassettes/ListBansTest.test_context_contains_delete_forms.yaml b/src/postorius/tests/fixtures/vcr_cassettes/ListBansTest.test_context_contains_delete_forms.yaml index 8de6086..48ce840 100644 --- a/src/postorius/tests/fixtures/vcr_cassettes/ListBansTest.test_context_contains_delete_forms.yaml +++ b/src/postorius/tests/fixtures/vcr_cassettes/ListBansTest.test_context_contains_delete_forms.yaml @@ -269,13 +269,18 @@ body: null headers: accept-encoding: ['gzip, deflate'] - method: !!python/unicode DELETE - uri: http://localhost:9001/3.0/lists/test_list@example.com + method: !!python/unicode GET + uri: http://localhost:9001/3.0/domains response: - body: {string: !!python/unicode ''} + body: {string: !!python/unicode '{"entries": [{"base_url": "http://example.com", + "description": null, "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", + "mail_host": "example.com", "self_link": "http://localhost:9001/3.0/domains/example.com", + "url_host": "example.com"}], "http_etag": "\"c385b155f8da284bf78dbe075e20f58a30c893ab\"", + "start": 0, "total_size": 1}'} headers: - content-length: ['0'] - status: {code: 204, message: No Content} + content-length: ['338'] + content-type: [application/json; charset=utf-8] + status: {code: 200, message: OK} - request: body: null headers: @@ -287,4 +292,17 @@ 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 + 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} version: 1 diff --git a/src/postorius/tests/fixtures/vcr_cassettes/ListBansTest.test_del_ban.yaml b/src/postorius/tests/fixtures/vcr_cassettes/ListBansTest.test_del_ban.yaml index 78c104b..462e1ce 100644 --- a/src/postorius/tests/fixtures/vcr_cassettes/ListBansTest.test_del_ban.yaml +++ b/src/postorius/tests/fixtures/vcr_cassettes/ListBansTest.test_del_ban.yaml @@ -195,13 +195,18 @@ body: null headers: accept-encoding: ['gzip, deflate'] - method: !!python/unicode DELETE - uri: http://localhost:9001/3.0/lists/test_list@example.com + method: !!python/unicode GET + uri: http://localhost:9001/3.0/domains response: - body: {string: !!python/unicode ''} + body: {string: !!python/unicode '{"entries": [{"base_url": "http://example.com", + "description": null, "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", + "mail_host": "example.com", "self_link": "http://localhost:9001/3.0/domains/example.com", + "url_host": "example.com"}], "http_etag": "\"c385b155f8da284bf78dbe075e20f58a30c893ab\"", + "start": 0, "total_size": 1}'} headers: - content-length: ['0'] - status: {code: 204, message: No Content} + content-length: ['338'] + content-type: [application/json; charset=utf-8] + status: {code: 200, message: OK} - request: body: null headers: @@ -213,4 +218,17 @@ 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 + 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} version: 1 diff --git a/src/postorius/tests/fixtures/vcr_cassettes/ListBansTest.test_del_unknown_ban.yaml b/src/postorius/tests/fixtures/vcr_cassettes/ListBansTest.test_del_unknown_ban.yaml index 91f9f86..79008b2 100644 --- a/src/postorius/tests/fixtures/vcr_cassettes/ListBansTest.test_del_unknown_ban.yaml +++ b/src/postorius/tests/fixtures/vcr_cassettes/ListBansTest.test_del_unknown_ban.yaml @@ -154,13 +154,18 @@ body: null headers: accept-encoding: ['gzip, deflate'] - method: !!python/unicode DELETE - uri: http://localhost:9001/3.0/lists/test_list@example.com + method: !!python/unicode GET + uri: http://localhost:9001/3.0/domains response: - body: {string: !!python/unicode ''} + body: {string: !!python/unicode '{"entries": [{"base_url": "http://example.com", + "description": null, "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", + "mail_host": "example.com", "self_link": "http://localhost:9001/3.0/domains/example.com", + "url_host": "example.com"}], "http_etag": "\"c385b155f8da284bf78dbe075e20f58a30c893ab\"", + "start": 0, "total_size": 1}'} headers: - content-length: ['0'] - status: {code: 204, message: No Content} + content-length: ['338'] + content-type: [application/json; charset=utf-8] + status: {code: 200, message: OK} - request: body: null headers: @@ -172,4 +177,17 @@ 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 + 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} version: 1 diff --git a/src/postorius/tests/fixtures/vcr_cassettes/ListBansTest.test_login_redirect_for_anonymous.yaml b/src/postorius/tests/fixtures/vcr_cassettes/ListBansTest.test_login_redirect_for_anonymous.yaml index 410f23d..dd02fa5 100644 --- a/src/postorius/tests/fixtures/vcr_cassettes/ListBansTest.test_login_redirect_for_anonymous.yaml +++ b/src/postorius/tests/fixtures/vcr_cassettes/ListBansTest.test_login_redirect_for_anonymous.yaml @@ -45,15 +45,15 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode GET - uri: http://localhost:9001/3.0/lists/test_list.example.com + uri: http://localhost:9001/3.0/domains response: - body: {string: !!python/unicode '{"display_name": "Test_list", "fqdn_listname": - "test_list@example.com", "http_etag": "\"3f02dac6cf71a3be179af5064b09ce668186e785\"", - "list_id": "test_list.example.com", "list_name": "test_list", "mail_host": - "example.com", "member_count": 0, "self_link": "http://localhost:9001/3.0/lists/test_list.example.com", - "volume": 1}'} + body: {string: !!python/unicode '{"entries": [{"base_url": "http://example.com", + "description": null, "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", + "mail_host": "example.com", "self_link": "http://localhost:9001/3.0/domains/example.com", + "url_host": "example.com"}], "http_etag": "\"c385b155f8da284bf78dbe075e20f58a30c893ab\"", + "start": 0, "total_size": 1}'} headers: - content-length: ['324'] + content-length: ['338'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -61,21 +61,23 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode DELETE - uri: http://localhost:9001/3.0/lists/test_list@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/domains/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 + 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} version: 1 diff --git a/src/postorius/tests/fixtures/vcr_cassettes/ListBansTest.test_no_access_for_basic_user.yaml b/src/postorius/tests/fixtures/vcr_cassettes/ListBansTest.test_no_access_for_basic_user.yaml index 2d4a81d..684da21 100644 --- a/src/postorius/tests/fixtures/vcr_cassettes/ListBansTest.test_no_access_for_basic_user.yaml +++ b/src/postorius/tests/fixtures/vcr_cassettes/ListBansTest.test_no_access_for_basic_user.yaml @@ -99,15 +99,15 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode GET - uri: http://localhost:9001/3.0/lists/test_list.example.com + uri: http://localhost:9001/3.0/domains response: - body: {string: !!python/unicode '{"display_name": "Test_list", "fqdn_listname": - "test_list@example.com", "http_etag": "\"3f02dac6cf71a3be179af5064b09ce668186e785\"", - "list_id": "test_list.example.com", "list_name": "test_list", "mail_host": - "example.com", "member_count": 0, "self_link": "http://localhost:9001/3.0/lists/test_list.example.com", - "volume": 1}'} + body: {string: !!python/unicode '{"entries": [{"base_url": "http://example.com", + "description": null, "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", + "mail_host": "example.com", "self_link": "http://localhost:9001/3.0/domains/example.com", + "url_host": "example.com"}], "http_etag": "\"c385b155f8da284bf78dbe075e20f58a30c893ab\"", + "start": 0, "total_size": 1}'} headers: - content-length: ['324'] + content-length: ['338'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -115,21 +115,23 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode DELETE - uri: http://localhost:9001/3.0/lists/test_list@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/domains/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 + 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} version: 1 diff --git a/src/postorius/tests/fixtures/vcr_cassettes/ListCreationTest.test_new_list_created_with_owner.yaml b/src/postorius/tests/fixtures/vcr_cassettes/ListCreationTest.test_new_list_created_with_owner.yaml index 594f0db..b685bbb 100644 --- a/src/postorius/tests/fixtures/vcr_cassettes/ListCreationTest.test_new_list_created_with_owner.yaml +++ b/src/postorius/tests/fixtures/vcr_cassettes/ListCreationTest.test_new_list_created_with_owner.yaml @@ -196,13 +196,13 @@ uri: http://localhost:9001/3.0/lists/a_new_list.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": "\"09866a5750e0216aadee006d6c9f483cba0cb1ab\"", + "delivery_mode": "regular", "email": "owner@example.com", "http_etag": "\"645830c5d2859c11d7b36adc11c1a5658fea5ea3\"", "list_id": "a_new_list.example.com", "member_id": 101, "moderation_action": "accept", "role": "owner", "self_link": "http://localhost:9001/3.0/members/101", - "user": "http://localhost:9001/3.0/users/29"}], "http_etag": "\"75ea67189342eb84d0ec5c2d16f9ec2a3f94fb0c\"", + "user": "http://localhost:9001/3.0/users/109"}], "http_etag": "\"43a4ced306c403084f8bb0643a10177d817dde77\"", "start": 0, "total_size": 1}'} headers: - content-length: ['495'] + content-length: ['496'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -210,16 +210,15 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode GET - uri: http://localhost:9001/3.0/lists + uri: http://localhost:9001/3.0/domains response: - body: {string: !!python/unicode '{"entries": [{"display_name": "A_new_list", "fqdn_listname": - "a_new_list@example.com", "http_etag": "\"447e005af2b208bfea01f6425b786356f0a374de\"", - "list_id": "a_new_list.example.com", "list_name": "a_new_list", "mail_host": - "example.com", "member_count": 0, "self_link": "http://localhost:9001/3.0/lists/a_new_list.example.com", - "volume": 1}], "http_etag": "\"dee96dcb9d3f736cc6fa170baeea8f879d7db6f0\"", + body: {string: !!python/unicode '{"entries": [{"base_url": "http://example.com", + "description": null, "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", + "mail_host": "example.com", "self_link": "http://localhost:9001/3.0/domains/example.com", + "url_host": "example.com"}], "http_etag": "\"c385b155f8da284bf78dbe075e20f58a30c893ab\"", "start": 0, "total_size": 1}'} headers: - content-length: ['434'] + content-length: ['338'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -227,7 +226,7 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode DELETE - uri: http://localhost:9001/3.0/lists/a_new_list@example.com + uri: http://localhost:9001/3.0/domains/example.com response: body: {string: !!python/unicode ''} headers: @@ -237,8 +236,24 @@ body: null headers: accept-encoding: ['gzip, deflate'] + method: !!python/unicode GET + uri: http://localhost:9001/3.0/users + response: + body: {string: !!python/unicode '{"entries": [{"created_on": "2005-08-01T07:49:23", + "http_etag": "\"2d51aacc73b65f7c530c507b6e17bd20297ff4ba\"", "is_server_owner": + false, "self_link": "http://localhost:9001/3.0/users/109", "user_id": 109}], + "http_etag": "\"2d09b4e3d5bc2cb0b15fb8101ebc6f396f13c3ab\"", "start": 0, "total_size": + 1}'} + headers: + content-length: ['297'] + 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/domains/example.com + uri: http://localhost:9001/3.0/users/109 response: body: {string: !!python/unicode ''} headers: diff --git a/src/postorius/tests/fixtures/vcr_cassettes/ListCreationTest.test_permission_denied.yaml b/src/postorius/tests/fixtures/vcr_cassettes/ListCreationTest.test_permission_denied.yaml index 1ece919..b5db0d3 100644 --- a/src/postorius/tests/fixtures/vcr_cassettes/ListCreationTest.test_permission_denied.yaml +++ b/src/postorius/tests/fixtures/vcr_cassettes/ListCreationTest.test_permission_denied.yaml @@ -41,12 +41,15 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode GET - uri: http://localhost:9001/3.0/lists + uri: http://localhost:9001/3.0/domains response: - body: {string: !!python/unicode '{"http_etag": "\"32223434a0f3af4cdc4673d1fbc5bac1f6d98fd3\"", - "start": 0, "total_size": 0}'} + body: {string: !!python/unicode '{"entries": [{"base_url": "http://example.com", + "description": null, "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", + "mail_host": "example.com", "self_link": "http://localhost:9001/3.0/domains/example.com", + "url_host": "example.com"}], "http_etag": "\"c385b155f8da284bf78dbe075e20f58a30c893ab\"", + "start": 0, "total_size": 1}'} headers: - content-length: ['90'] + content-length: ['338'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -60,4 +63,17 @@ 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 + 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} version: 1 diff --git a/src/postorius/tests/fixtures/vcr_cassettes/ListHeaderMatchesTest.test_add.yaml b/src/postorius/tests/fixtures/vcr_cassettes/ListHeaderMatchesTest.test_add.yaml index 9ebb298..de38c80 100644 --- a/src/postorius/tests/fixtures/vcr_cassettes/ListHeaderMatchesTest.test_add.yaml +++ b/src/postorius/tests/fixtures/vcr_cassettes/ListHeaderMatchesTest.test_add.yaml @@ -89,10 +89,10 @@ uri: http://localhost:9001/3.0/users/owner@example.com response: body: {string: !!python/unicode '{"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}'} + "\"6dc3faac46bcef307cb04b877c1cb62ddff20660\"", "is_server_owner": false, + "self_link": "http://localhost:9001/3.0/users/22", "user_id": 22}'} headers: - content-length: ['188'] + content-length: ['190'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -100,15 +100,15 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode GET - uri: http://localhost:9001/3.0/users/6/addresses + uri: http://localhost:9001/3.0/users/22/addresses response: body: {string: !!python/unicode '{"entries": [{"email": "owner@example.com", "http_etag": - "\"7efeccdd4edd0bed02cd2141365a115239f83be4\"", "original_email": "owner@example.com", + "\"30c854895f615d710c8ae4658f7c6bbf4ae839bb\"", "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/6"}], "http_etag": "\"a565f7d323e0a6ca5da35f6d965148fe4fe03fbb\"", + "user": "http://localhost:9001/3.0/users/22"}], "http_etag": "\"48ab35f8e823f4c7e8136d7f4c616a807fb07c22\"", "start": 0, "total_size": 1}'} headers: - content-length: ['390'] + content-length: ['391'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -134,13 +134,13 @@ uri: http://localhost:9001/3.0/lists/list.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": "\"b3085c455c20a7bbfd074cc9acc703c2445551d6\"", + "delivery_mode": "regular", "email": "owner@example.com", "http_etag": "\"d9942cdb6340896f4892bd0f3133ee721f803362\"", "list_id": "list.example.com", "member_id": 23, "moderation_action": "accept", "role": "owner", "self_link": "http://localhost:9001/3.0/members/23", "user": - "http://localhost:9001/3.0/users/6"}], "http_etag": "\"9c0c4a0f646d8c4feaca4a03f4761abce6ecfc95\"", + "http://localhost:9001/3.0/users/22"}], "http_etag": "\"814cebe88cf54907b5ae6a41f3a1a8f08a43de61\"", "start": 0, "total_size": 1}'} headers: - content-length: ['486'] + content-length: ['487'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -152,13 +152,13 @@ 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": - "\"431455e0d7a45e45f64df20af82bec50ce4cabcf\"", "list_id": "list.example.com", + "\"87aad2d4bae4e69339993c265ffa9b260bb6a553\"", "list_id": "list.example.com", "member_id": 24, "moderation_action": "accept", "role": "moderator", "self_link": - "http://localhost:9001/3.0/members/24", "user": "http://localhost:9001/3.0/users/7"}], - "http_etag": "\"e2f8afe35cd0a0dd80ad3ab96b936747274eeda4\"", "start": 0, "total_size": + "http://localhost:9001/3.0/members/24", "user": "http://localhost:9001/3.0/users/23"}], + "http_etag": "\"aa894e4f77fb30fea769e18c7bef04264ebde146\"", "start": 0, "total_size": 1}'} headers: - content-length: ['498'] + content-length: ['499'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -221,10 +221,10 @@ uri: http://localhost:9001/3.0/users/owner@example.com response: body: {string: !!python/unicode '{"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}'} + "\"6dc3faac46bcef307cb04b877c1cb62ddff20660\"", "is_server_owner": false, + "self_link": "http://localhost:9001/3.0/users/22", "user_id": 22}'} headers: - content-length: ['188'] + content-length: ['190'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -232,15 +232,15 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode GET - uri: http://localhost:9001/3.0/users/6/addresses + uri: http://localhost:9001/3.0/users/22/addresses response: body: {string: !!python/unicode '{"entries": [{"email": "owner@example.com", "http_etag": - "\"7efeccdd4edd0bed02cd2141365a115239f83be4\"", "original_email": "owner@example.com", + "\"30c854895f615d710c8ae4658f7c6bbf4ae839bb\"", "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/6"}], "http_etag": "\"a565f7d323e0a6ca5da35f6d965148fe4fe03fbb\"", + "user": "http://localhost:9001/3.0/users/22"}], "http_etag": "\"48ab35f8e823f4c7e8136d7f4c616a807fb07c22\"", "start": 0, "total_size": 1}'} headers: - content-length: ['390'] + content-length: ['391'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -266,13 +266,13 @@ uri: http://localhost:9001/3.0/lists/list.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": "\"b3085c455c20a7bbfd074cc9acc703c2445551d6\"", + "delivery_mode": "regular", "email": "owner@example.com", "http_etag": "\"d9942cdb6340896f4892bd0f3133ee721f803362\"", "list_id": "list.example.com", "member_id": 23, "moderation_action": "accept", "role": "owner", "self_link": "http://localhost:9001/3.0/members/23", "user": - "http://localhost:9001/3.0/users/6"}], "http_etag": "\"9c0c4a0f646d8c4feaca4a03f4761abce6ecfc95\"", + "http://localhost:9001/3.0/users/22"}], "http_etag": "\"814cebe88cf54907b5ae6a41f3a1a8f08a43de61\"", "start": 0, "total_size": 1}'} headers: - content-length: ['486'] + content-length: ['487'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -284,13 +284,13 @@ 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": - "\"431455e0d7a45e45f64df20af82bec50ce4cabcf\"", "list_id": "list.example.com", + "\"87aad2d4bae4e69339993c265ffa9b260bb6a553\"", "list_id": "list.example.com", "member_id": 24, "moderation_action": "accept", "role": "moderator", "self_link": - "http://localhost:9001/3.0/members/24", "user": "http://localhost:9001/3.0/users/7"}], - "http_etag": "\"e2f8afe35cd0a0dd80ad3ab96b936747274eeda4\"", "start": 0, "total_size": + "http://localhost:9001/3.0/members/24", "user": "http://localhost:9001/3.0/users/23"}], + "http_etag": "\"aa894e4f77fb30fea769e18c7bef04264ebde146\"", "start": 0, "total_size": 1}'} headers: - content-length: ['498'] + content-length: ['499'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -360,8 +360,58 @@ body: null headers: accept-encoding: ['gzip, deflate'] + method: !!python/unicode GET + uri: http://localhost:9001/3.0/domains + response: + body: {string: !!python/unicode '{"entries": [{"base_url": "http://example.com", + "description": null, "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", + "mail_host": "example.com", "self_link": "http://localhost:9001/3.0/domains/example.com", + "url_host": "example.com"}], "http_etag": "\"c385b155f8da284bf78dbe075e20f58a30c893ab\"", + "start": 0, "total_size": 1}'} + headers: + content-length: ['338'] + 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/list@example.com + uri: http://localhost:9001/3.0/domains/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 + response: + body: {string: !!python/unicode '{"entries": [{"created_on": "2005-08-01T07:49:23", + "display_name": "None", "http_etag": "\"49b863f075905cce6e2628f1c7286796634cb0d2\"", + "is_server_owner": false, "self_link": "http://localhost:9001/3.0/users/20", + "user_id": 20}, {"created_on": "2005-08-01T07:49:23", "display_name": "None", + "http_etag": "\"4e69221cb1880315766131d04dc5c375d3796f29\"", "is_server_owner": + false, "self_link": "http://localhost:9001/3.0/users/21", "user_id": 21}, + {"created_on": "2005-08-01T07:49:23", "http_etag": "\"6dc3faac46bcef307cb04b877c1cb62ddff20660\"", + "is_server_owner": false, "self_link": "http://localhost:9001/3.0/users/22", + "user_id": 22}, {"created_on": "2005-08-01T07:49:23", "http_etag": "\"b3a1bcb260c4bd5e880e4324ec95d6287c26d550\"", + "is_server_owner": false, "self_link": "http://localhost:9001/3.0/users/23", + "user_id": 23}], "http_etag": "\"d3ce5b6ff648d750eac4ee9ec0ac770ca4f52eda\"", + "start": 0, "total_size": 4}'} + headers: + content-length: ['919'] + 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/20 response: body: {string: !!python/unicode ''} headers: @@ -372,7 +422,29 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode DELETE - uri: http://localhost:9001/3.0/domains/example.com + uri: http://localhost:9001/3.0/users/21 + 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/22 + 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/23 response: body: {string: !!python/unicode ''} headers: diff --git a/src/postorius/tests/fixtures/vcr_cassettes/ListHeaderMatchesTest.test_add_empty.yaml b/src/postorius/tests/fixtures/vcr_cassettes/ListHeaderMatchesTest.test_add_empty.yaml index bb0ed92..e04c8a6 100644 --- a/src/postorius/tests/fixtures/vcr_cassettes/ListHeaderMatchesTest.test_add_empty.yaml +++ b/src/postorius/tests/fixtures/vcr_cassettes/ListHeaderMatchesTest.test_add_empty.yaml @@ -89,10 +89,10 @@ uri: http://localhost:9001/3.0/users/owner@example.com response: body: {string: !!python/unicode '{"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}'} + "\"1e86381735f77312260a704e0b6dc204d733f858\"", "is_server_owner": false, + "self_link": "http://localhost:9001/3.0/users/24", "user_id": 24}'} headers: - content-length: ['188'] + content-length: ['190'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -100,15 +100,15 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode GET - uri: http://localhost:9001/3.0/users/6/addresses + uri: http://localhost:9001/3.0/users/24/addresses response: body: {string: !!python/unicode '{"entries": [{"email": "owner@example.com", "http_etag": - "\"7efeccdd4edd0bed02cd2141365a115239f83be4\"", "original_email": "owner@example.com", + "\"42e6c30370b928e548192a049e0b1785c7ad5887\"", "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/6"}], "http_etag": "\"a565f7d323e0a6ca5da35f6d965148fe4fe03fbb\"", + "user": "http://localhost:9001/3.0/users/24"}], "http_etag": "\"d16dbb4b79b13cc0d29cde6cbbea8af63cf13b8b\"", "start": 0, "total_size": 1}'} headers: - content-length: ['390'] + content-length: ['391'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -134,13 +134,13 @@ uri: http://localhost:9001/3.0/lists/list.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": "\"0cbc6534c2b8a970da97fa245970cf08710a72b7\"", + "delivery_mode": "regular", "email": "owner@example.com", "http_etag": "\"5da7648ed645f07459dadc82222ca8da369d4751\"", "list_id": "list.example.com", "member_id": 25, "moderation_action": "accept", "role": "owner", "self_link": "http://localhost:9001/3.0/members/25", "user": - "http://localhost:9001/3.0/users/6"}], "http_etag": "\"b176259e59f8c6c36b66520f448ea29b803b265b\"", + "http://localhost:9001/3.0/users/24"}], "http_etag": "\"c5228faf55238a9d70d82049179e244c20863821\"", "start": 0, "total_size": 1}'} headers: - content-length: ['486'] + content-length: ['487'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -152,13 +152,13 @@ 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": - "\"a724316fbf4f74b99a11e03a92f109b77f049862\"", "list_id": "list.example.com", + "\"54e43a6c9f25a34d8acb33e9218d06c65165b1b3\"", "list_id": "list.example.com", "member_id": 26, "moderation_action": "accept", "role": "moderator", "self_link": - "http://localhost:9001/3.0/members/26", "user": "http://localhost:9001/3.0/users/7"}], - "http_etag": "\"535da6121a7839b2653cb337c9de8c091a4cc204\"", "start": 0, "total_size": + "http://localhost:9001/3.0/members/26", "user": "http://localhost:9001/3.0/users/25"}], + "http_etag": "\"0c57e592caa7e3dcc95e0c95569be6f617aa5c38\"", "start": 0, "total_size": 1}'} headers: - content-length: ['498'] + content-length: ['499'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -197,10 +197,10 @@ uri: http://localhost:9001/3.0/users/owner@example.com response: body: {string: !!python/unicode '{"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}'} + "\"1e86381735f77312260a704e0b6dc204d733f858\"", "is_server_owner": false, + "self_link": "http://localhost:9001/3.0/users/24", "user_id": 24}'} headers: - content-length: ['188'] + content-length: ['190'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -208,15 +208,15 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode GET - uri: http://localhost:9001/3.0/users/6/addresses + uri: http://localhost:9001/3.0/users/24/addresses response: body: {string: !!python/unicode '{"entries": [{"email": "owner@example.com", "http_etag": - "\"7efeccdd4edd0bed02cd2141365a115239f83be4\"", "original_email": "owner@example.com", + "\"42e6c30370b928e548192a049e0b1785c7ad5887\"", "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/6"}], "http_etag": "\"a565f7d323e0a6ca5da35f6d965148fe4fe03fbb\"", + "user": "http://localhost:9001/3.0/users/24"}], "http_etag": "\"d16dbb4b79b13cc0d29cde6cbbea8af63cf13b8b\"", "start": 0, "total_size": 1}'} headers: - content-length: ['390'] + content-length: ['391'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -242,13 +242,13 @@ uri: http://localhost:9001/3.0/lists/list.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": "\"0cbc6534c2b8a970da97fa245970cf08710a72b7\"", + "delivery_mode": "regular", "email": "owner@example.com", "http_etag": "\"5da7648ed645f07459dadc82222ca8da369d4751\"", "list_id": "list.example.com", "member_id": 25, "moderation_action": "accept", "role": "owner", "self_link": "http://localhost:9001/3.0/members/25", "user": - "http://localhost:9001/3.0/users/6"}], "http_etag": "\"b176259e59f8c6c36b66520f448ea29b803b265b\"", + "http://localhost:9001/3.0/users/24"}], "http_etag": "\"c5228faf55238a9d70d82049179e244c20863821\"", "start": 0, "total_size": 1}'} headers: - content-length: ['486'] + content-length: ['487'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -260,13 +260,13 @@ 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": - "\"a724316fbf4f74b99a11e03a92f109b77f049862\"", "list_id": "list.example.com", + "\"54e43a6c9f25a34d8acb33e9218d06c65165b1b3\"", "list_id": "list.example.com", "member_id": 26, "moderation_action": "accept", "role": "moderator", "self_link": - "http://localhost:9001/3.0/members/26", "user": "http://localhost:9001/3.0/users/7"}], - "http_etag": "\"535da6121a7839b2653cb337c9de8c091a4cc204\"", "start": 0, "total_size": + "http://localhost:9001/3.0/members/26", "user": "http://localhost:9001/3.0/users/25"}], + "http_etag": "\"0c57e592caa7e3dcc95e0c95569be6f617aa5c38\"", "start": 0, "total_size": 1}'} headers: - content-length: ['498'] + content-length: ['499'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -314,8 +314,53 @@ body: null headers: accept-encoding: ['gzip, deflate'] + method: !!python/unicode GET + uri: http://localhost:9001/3.0/domains + response: + body: {string: !!python/unicode '{"entries": [{"base_url": "http://example.com", + "description": null, "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", + "mail_host": "example.com", "self_link": "http://localhost:9001/3.0/domains/example.com", + "url_host": "example.com"}], "http_etag": "\"c385b155f8da284bf78dbe075e20f58a30c893ab\"", + "start": 0, "total_size": 1}'} + headers: + content-length: ['338'] + 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/list@example.com + uri: http://localhost:9001/3.0/domains/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 + response: + body: {string: !!python/unicode '{"entries": [{"created_on": "2005-08-01T07:49:23", + "http_etag": "\"1e86381735f77312260a704e0b6dc204d733f858\"", "is_server_owner": + false, "self_link": "http://localhost:9001/3.0/users/24", "user_id": 24}, + {"created_on": "2005-08-01T07:49:23", "http_etag": "\"0c3f6e8712fd05b9da49c42bf9600a5414b7958f\"", + "is_server_owner": false, "self_link": "http://localhost:9001/3.0/users/25", + "user_id": 25}], "http_etag": "\"c3280a2c91c60268840c851206755d59a4cf3100\"", + "start": 0, "total_size": 2}'} + headers: + content-length: ['487'] + 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/24 response: body: {string: !!python/unicode ''} headers: @@ -326,7 +371,7 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode DELETE - uri: http://localhost:9001/3.0/domains/example.com + uri: http://localhost:9001/3.0/users/25 response: body: {string: !!python/unicode ''} headers: diff --git a/src/postorius/tests/fixtures/vcr_cassettes/ListHeaderMatchesTest.test_add_empty_header.yaml b/src/postorius/tests/fixtures/vcr_cassettes/ListHeaderMatchesTest.test_add_empty_header.yaml index 6732905..e309e0c 100644 --- a/src/postorius/tests/fixtures/vcr_cassettes/ListHeaderMatchesTest.test_add_empty_header.yaml +++ b/src/postorius/tests/fixtures/vcr_cassettes/ListHeaderMatchesTest.test_add_empty_header.yaml @@ -89,10 +89,10 @@ uri: http://localhost:9001/3.0/users/owner@example.com response: body: {string: !!python/unicode '{"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}'} + "\"c73be856843a113d5eb32f60ae4315192adb1045\"", "is_server_owner": false, + "self_link": "http://localhost:9001/3.0/users/26", "user_id": 26}'} headers: - content-length: ['188'] + content-length: ['190'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -100,15 +100,15 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode GET - uri: http://localhost:9001/3.0/users/6/addresses + uri: http://localhost:9001/3.0/users/26/addresses response: body: {string: !!python/unicode '{"entries": [{"email": "owner@example.com", "http_etag": - "\"7efeccdd4edd0bed02cd2141365a115239f83be4\"", "original_email": "owner@example.com", + "\"f32b631de442541c05aca9fa04b5c48f2846870b\"", "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/6"}], "http_etag": "\"a565f7d323e0a6ca5da35f6d965148fe4fe03fbb\"", + "user": "http://localhost:9001/3.0/users/26"}], "http_etag": "\"043d3df86a2e395ff7c9531c17a336d02386205b\"", "start": 0, "total_size": 1}'} headers: - content-length: ['390'] + content-length: ['391'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -134,13 +134,13 @@ uri: http://localhost:9001/3.0/lists/list.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": "\"8aa913ebcd4ae349810d8f0d487b49dd7dbeec38\"", + "delivery_mode": "regular", "email": "owner@example.com", "http_etag": "\"86749f2b005820751c1523ff961948d37bbe2459\"", "list_id": "list.example.com", "member_id": 27, "moderation_action": "accept", "role": "owner", "self_link": "http://localhost:9001/3.0/members/27", "user": - "http://localhost:9001/3.0/users/6"}], "http_etag": "\"90610974fb8724e3b3efed29902135fd7e272811\"", + "http://localhost:9001/3.0/users/26"}], "http_etag": "\"a760a696e37a5ea0bf6c247e813f7bcdac29181d\"", "start": 0, "total_size": 1}'} headers: - content-length: ['486'] + content-length: ['487'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -152,13 +152,13 @@ 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": - "\"fac749cc246ee63345bed81458f06b813044a2e2\"", "list_id": "list.example.com", + "\"9ccd294208eafe1599fb07202c6cea963202d0c4\"", "list_id": "list.example.com", "member_id": 28, "moderation_action": "accept", "role": "moderator", "self_link": - "http://localhost:9001/3.0/members/28", "user": "http://localhost:9001/3.0/users/7"}], - "http_etag": "\"a960b3b29f92c025f52fb431d9682849eecfd454\"", "start": 0, "total_size": + "http://localhost:9001/3.0/members/28", "user": "http://localhost:9001/3.0/users/27"}], + "http_etag": "\"327fa2129d0a963d60d5dca49f2c43e35b8f0dac\"", "start": 0, "total_size": 1}'} headers: - content-length: ['498'] + content-length: ['499'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -206,8 +206,53 @@ body: null headers: accept-encoding: ['gzip, deflate'] + method: !!python/unicode GET + uri: http://localhost:9001/3.0/domains + response: + body: {string: !!python/unicode '{"entries": [{"base_url": "http://example.com", + "description": null, "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", + "mail_host": "example.com", "self_link": "http://localhost:9001/3.0/domains/example.com", + "url_host": "example.com"}], "http_etag": "\"c385b155f8da284bf78dbe075e20f58a30c893ab\"", + "start": 0, "total_size": 1}'} + headers: + content-length: ['338'] + 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/list@example.com + uri: http://localhost:9001/3.0/domains/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 + response: + body: {string: !!python/unicode '{"entries": [{"created_on": "2005-08-01T07:49:23", + "http_etag": "\"c73be856843a113d5eb32f60ae4315192adb1045\"", "is_server_owner": + false, "self_link": "http://localhost:9001/3.0/users/26", "user_id": 26}, + {"created_on": "2005-08-01T07:49:23", "http_etag": "\"1479b23f4b3c2af04f98946e313297006dd20754\"", + "is_server_owner": false, "self_link": "http://localhost:9001/3.0/users/27", + "user_id": 27}], "http_etag": "\"f31e335c7b4f83fc182ab0eafdc669a0ae1705b9\"", + "start": 0, "total_size": 2}'} + headers: + content-length: ['487'] + 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/26 response: body: {string: !!python/unicode ''} headers: @@ -218,7 +263,7 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode DELETE - uri: http://localhost:9001/3.0/domains/example.com + uri: http://localhost:9001/3.0/users/27 response: body: {string: !!python/unicode ''} headers: diff --git a/src/postorius/tests/fixtures/vcr_cassettes/ListHeaderMatchesTest.test_add_empty_pattern.yaml b/src/postorius/tests/fixtures/vcr_cassettes/ListHeaderMatchesTest.test_add_empty_pattern.yaml index 66af06f..d24241a 100644 --- a/src/postorius/tests/fixtures/vcr_cassettes/ListHeaderMatchesTest.test_add_empty_pattern.yaml +++ b/src/postorius/tests/fixtures/vcr_cassettes/ListHeaderMatchesTest.test_add_empty_pattern.yaml @@ -89,10 +89,10 @@ uri: http://localhost:9001/3.0/users/owner@example.com response: body: {string: !!python/unicode '{"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}'} + "\"641cbb9a7ea368f465861330cbda5a46dedc4d71\"", "is_server_owner": false, + "self_link": "http://localhost:9001/3.0/users/28", "user_id": 28}'} headers: - content-length: ['188'] + content-length: ['190'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -100,15 +100,15 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode GET - uri: http://localhost:9001/3.0/users/6/addresses + uri: http://localhost:9001/3.0/users/28/addresses response: body: {string: !!python/unicode '{"entries": [{"email": "owner@example.com", "http_etag": - "\"7efeccdd4edd0bed02cd2141365a115239f83be4\"", "original_email": "owner@example.com", + "\"1add9a764a6d0ff21f68844b3f2f3cb358e31fe0\"", "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/6"}], "http_etag": "\"a565f7d323e0a6ca5da35f6d965148fe4fe03fbb\"", + "user": "http://localhost:9001/3.0/users/28"}], "http_etag": "\"15fc2c4a79e5c918e9da053d1dea5045f0f9f7e9\"", "start": 0, "total_size": 1}'} headers: - content-length: ['390'] + content-length: ['391'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -134,13 +134,13 @@ uri: http://localhost:9001/3.0/lists/list.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": "\"0e4d79a043dc939a16f53f44f4bd1ea675f77ba7\"", + "delivery_mode": "regular", "email": "owner@example.com", "http_etag": "\"3a03b52df0e2aebe8e663e476972418061359ead\"", "list_id": "list.example.com", "member_id": 29, "moderation_action": "accept", "role": "owner", "self_link": "http://localhost:9001/3.0/members/29", "user": - "http://localhost:9001/3.0/users/6"}], "http_etag": "\"0f5121e7ee4c51226674440871ae2e7fa6fc48e8\"", + "http://localhost:9001/3.0/users/28"}], "http_etag": "\"bace5045bc873a08f3643e3f7eab3d14e808669f\"", "start": 0, "total_size": 1}'} headers: - content-length: ['486'] + content-length: ['487'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -152,13 +152,13 @@ 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": - "\"b227c995ebf21adb51cd9107fd7d06f2c1b3185d\"", "list_id": "list.example.com", + "\"19df6996663932548e40c9ad812ed81795ae46f1\"", "list_id": "list.example.com", "member_id": 30, "moderation_action": "accept", "role": "moderator", "self_link": - "http://localhost:9001/3.0/members/30", "user": "http://localhost:9001/3.0/users/7"}], - "http_etag": "\"989cf950a7c53671b23c990ed59f4a8dfeebd03b\"", "start": 0, "total_size": + "http://localhost:9001/3.0/members/30", "user": "http://localhost:9001/3.0/users/29"}], + "http_etag": "\"08c72e5949835c174002bfe9a85c995fe9d5bb2c\"", "start": 0, "total_size": 1}'} headers: - content-length: ['498'] + content-length: ['499'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -206,8 +206,53 @@ body: null headers: accept-encoding: ['gzip, deflate'] + method: !!python/unicode GET + uri: http://localhost:9001/3.0/domains + response: + body: {string: !!python/unicode '{"entries": [{"base_url": "http://example.com", + "description": null, "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", + "mail_host": "example.com", "self_link": "http://localhost:9001/3.0/domains/example.com", + "url_host": "example.com"}], "http_etag": "\"c385b155f8da284bf78dbe075e20f58a30c893ab\"", + "start": 0, "total_size": 1}'} + headers: + content-length: ['338'] + 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/list@example.com + uri: http://localhost:9001/3.0/domains/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 + response: + body: {string: !!python/unicode '{"entries": [{"created_on": "2005-08-01T07:49:23", + "http_etag": "\"641cbb9a7ea368f465861330cbda5a46dedc4d71\"", "is_server_owner": + false, "self_link": "http://localhost:9001/3.0/users/28", "user_id": 28}, + {"created_on": "2005-08-01T07:49:23", "http_etag": "\"4e1a95736360f3a01f989768ff1a28a3f7b961e0\"", + "is_server_owner": false, "self_link": "http://localhost:9001/3.0/users/29", + "user_id": 29}], "http_etag": "\"e8c75980d0cabcd90d5b647b9b46c088be4d8784\"", + "start": 0, "total_size": 2}'} + headers: + content-length: ['487'] + 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/28 response: body: {string: !!python/unicode ''} headers: @@ -218,7 +263,7 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode DELETE - uri: http://localhost:9001/3.0/domains/example.com + uri: http://localhost:9001/3.0/users/29 response: body: {string: !!python/unicode ''} headers: diff --git a/src/postorius/tests/fixtures/vcr_cassettes/ListHeaderMatchesTest.test_add_existing.yaml b/src/postorius/tests/fixtures/vcr_cassettes/ListHeaderMatchesTest.test_add_existing.yaml index cd7e843..a8a61d4 100644 --- a/src/postorius/tests/fixtures/vcr_cassettes/ListHeaderMatchesTest.test_add_existing.yaml +++ b/src/postorius/tests/fixtures/vcr_cassettes/ListHeaderMatchesTest.test_add_existing.yaml @@ -102,10 +102,10 @@ uri: http://localhost:9001/3.0/users/owner@example.com response: body: {string: !!python/unicode '{"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}'} + "\"32459ccb62cf1e20b180199fc48b4cf2b67b404e\"", "is_server_owner": false, + "self_link": "http://localhost:9001/3.0/users/30", "user_id": 30}'} headers: - content-length: ['188'] + content-length: ['190'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -113,15 +113,15 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode GET - uri: http://localhost:9001/3.0/users/6/addresses + uri: http://localhost:9001/3.0/users/30/addresses response: body: {string: !!python/unicode '{"entries": [{"email": "owner@example.com", "http_etag": - "\"7efeccdd4edd0bed02cd2141365a115239f83be4\"", "original_email": "owner@example.com", + "\"2c8628a5236c474b5a1fc8a417e7da5cfcb1ea8d\"", "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/6"}], "http_etag": "\"a565f7d323e0a6ca5da35f6d965148fe4fe03fbb\"", + "user": "http://localhost:9001/3.0/users/30"}], "http_etag": "\"45e94ef030fccf578ae9d667d715f4505ae58285\"", "start": 0, "total_size": 1}'} headers: - content-length: ['390'] + content-length: ['391'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -147,13 +147,13 @@ uri: http://localhost:9001/3.0/lists/list.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": "\"24aa6e0438131bd5ab07fd5dd7e4326e8268cef5\"", + "delivery_mode": "regular", "email": "owner@example.com", "http_etag": "\"64772c0049db994dc4bfb252ff8d8ab21197048b\"", "list_id": "list.example.com", "member_id": 31, "moderation_action": "accept", "role": "owner", "self_link": "http://localhost:9001/3.0/members/31", "user": - "http://localhost:9001/3.0/users/6"}], "http_etag": "\"3d5198105c25da87e47d7bb33360be2db35a94fd\"", + "http://localhost:9001/3.0/users/30"}], "http_etag": "\"e0bb3ed665a4d282151571b991fa5051e34f8b95\"", "start": 0, "total_size": 1}'} headers: - content-length: ['486'] + content-length: ['487'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -165,13 +165,13 @@ 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": - "\"cb188332b647676c84b3ae9c91430d55d462f504\"", "list_id": "list.example.com", + "\"d84672cfe81c18473e6d4197bdf61d4ef7191354\"", "list_id": "list.example.com", "member_id": 32, "moderation_action": "accept", "role": "moderator", "self_link": - "http://localhost:9001/3.0/members/32", "user": "http://localhost:9001/3.0/users/7"}], - "http_etag": "\"ddab9f7d9f4a65518db5d644425cb3bf63eda468\"", "start": 0, "total_size": + "http://localhost:9001/3.0/members/32", "user": "http://localhost:9001/3.0/users/31"}], + "http_etag": "\"3d99fc8848bb0400e55c043246fd847ed738689b\"", "start": 0, "total_size": 1}'} headers: - content-length: ['498'] + content-length: ['499'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -250,10 +250,10 @@ uri: http://localhost:9001/3.0/users/owner@example.com response: body: {string: !!python/unicode '{"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}'} + "\"32459ccb62cf1e20b180199fc48b4cf2b67b404e\"", "is_server_owner": false, + "self_link": "http://localhost:9001/3.0/users/30", "user_id": 30}'} headers: - content-length: ['188'] + content-length: ['190'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -261,15 +261,15 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode GET - uri: http://localhost:9001/3.0/users/6/addresses + uri: http://localhost:9001/3.0/users/30/addresses response: body: {string: !!python/unicode '{"entries": [{"email": "owner@example.com", "http_etag": - "\"7efeccdd4edd0bed02cd2141365a115239f83be4\"", "original_email": "owner@example.com", + "\"2c8628a5236c474b5a1fc8a417e7da5cfcb1ea8d\"", "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/6"}], "http_etag": "\"a565f7d323e0a6ca5da35f6d965148fe4fe03fbb\"", + "user": "http://localhost:9001/3.0/users/30"}], "http_etag": "\"45e94ef030fccf578ae9d667d715f4505ae58285\"", "start": 0, "total_size": 1}'} headers: - content-length: ['390'] + content-length: ['391'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -295,13 +295,13 @@ uri: http://localhost:9001/3.0/lists/list.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": "\"24aa6e0438131bd5ab07fd5dd7e4326e8268cef5\"", + "delivery_mode": "regular", "email": "owner@example.com", "http_etag": "\"64772c0049db994dc4bfb252ff8d8ab21197048b\"", "list_id": "list.example.com", "member_id": 31, "moderation_action": "accept", "role": "owner", "self_link": "http://localhost:9001/3.0/members/31", "user": - "http://localhost:9001/3.0/users/6"}], "http_etag": "\"3d5198105c25da87e47d7bb33360be2db35a94fd\"", + "http://localhost:9001/3.0/users/30"}], "http_etag": "\"e0bb3ed665a4d282151571b991fa5051e34f8b95\"", "start": 0, "total_size": 1}'} headers: - content-length: ['486'] + content-length: ['487'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -313,13 +313,13 @@ 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": - "\"cb188332b647676c84b3ae9c91430d55d462f504\"", "list_id": "list.example.com", + "\"d84672cfe81c18473e6d4197bdf61d4ef7191354\"", "list_id": "list.example.com", "member_id": 32, "moderation_action": "accept", "role": "moderator", "self_link": - "http://localhost:9001/3.0/members/32", "user": "http://localhost:9001/3.0/users/7"}], - "http_etag": "\"ddab9f7d9f4a65518db5d644425cb3bf63eda468\"", "start": 0, "total_size": + "http://localhost:9001/3.0/members/32", "user": "http://localhost:9001/3.0/users/31"}], + "http_etag": "\"3d99fc8848bb0400e55c043246fd847ed738689b\"", "start": 0, "total_size": 1}'} headers: - content-length: ['498'] + content-length: ['499'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -389,8 +389,53 @@ body: null headers: accept-encoding: ['gzip, deflate'] + method: !!python/unicode GET + uri: http://localhost:9001/3.0/domains + response: + body: {string: !!python/unicode '{"entries": [{"base_url": "http://example.com", + "description": null, "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", + "mail_host": "example.com", "self_link": "http://localhost:9001/3.0/domains/example.com", + "url_host": "example.com"}], "http_etag": "\"c385b155f8da284bf78dbe075e20f58a30c893ab\"", + "start": 0, "total_size": 1}'} + headers: + content-length: ['338'] + 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/list@example.com + uri: http://localhost:9001/3.0/domains/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 + response: + body: {string: !!python/unicode '{"entries": [{"created_on": "2005-08-01T07:49:23", + "http_etag": "\"32459ccb62cf1e20b180199fc48b4cf2b67b404e\"", "is_server_owner": + false, "self_link": "http://localhost:9001/3.0/users/30", "user_id": 30}, + {"created_on": "2005-08-01T07:49:23", "http_etag": "\"c744d1db066b1d55bf03caedfbd1c9b98a5874bc\"", + "is_server_owner": false, "self_link": "http://localhost:9001/3.0/users/31", + "user_id": 31}], "http_etag": "\"5edee0046e4faf6e022cbc0963b99c1ef005b4a1\"", + "start": 0, "total_size": 2}'} + headers: + content-length: ['487'] + 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/30 response: body: {string: !!python/unicode ''} headers: @@ -401,7 +446,7 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode DELETE - uri: http://localhost:9001/3.0/domains/example.com + uri: http://localhost:9001/3.0/users/31 response: body: {string: !!python/unicode ''} headers: diff --git a/src/postorius/tests/fixtures/vcr_cassettes/ListHeaderMatchesTest.test_delete.yaml b/src/postorius/tests/fixtures/vcr_cassettes/ListHeaderMatchesTest.test_delete.yaml index 23d8d9d..43aef5e 100644 --- a/src/postorius/tests/fixtures/vcr_cassettes/ListHeaderMatchesTest.test_delete.yaml +++ b/src/postorius/tests/fixtures/vcr_cassettes/ListHeaderMatchesTest.test_delete.yaml @@ -115,10 +115,10 @@ uri: http://localhost:9001/3.0/users/owner@example.com response: body: {string: !!python/unicode '{"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}'} + "\"bdba54b81678064437568ff4e8f9edad6efc2700\"", "is_server_owner": false, + "self_link": "http://localhost:9001/3.0/users/32", "user_id": 32}'} headers: - content-length: ['188'] + content-length: ['190'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -126,15 +126,15 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode GET - uri: http://localhost:9001/3.0/users/6/addresses + uri: http://localhost:9001/3.0/users/32/addresses response: body: {string: !!python/unicode '{"entries": [{"email": "owner@example.com", "http_etag": - "\"7efeccdd4edd0bed02cd2141365a115239f83be4\"", "original_email": "owner@example.com", + "\"1bc90eeb62d3c4046237d4949836179aa65b4d9a\"", "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/6"}], "http_etag": "\"a565f7d323e0a6ca5da35f6d965148fe4fe03fbb\"", + "user": "http://localhost:9001/3.0/users/32"}], "http_etag": "\"15f86407975b9b0d23264db1495165e1d31ebd91\"", "start": 0, "total_size": 1}'} headers: - content-length: ['390'] + content-length: ['391'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -160,13 +160,13 @@ uri: http://localhost:9001/3.0/lists/list.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": "\"10fbbb6fcd377277ad5981c151c7a25ced155d78\"", + "delivery_mode": "regular", "email": "owner@example.com", "http_etag": "\"79fd1f3b36b0ea0c90d066b8c6279d5af0538da5\"", "list_id": "list.example.com", "member_id": 33, "moderation_action": "accept", "role": "owner", "self_link": "http://localhost:9001/3.0/members/33", "user": - "http://localhost:9001/3.0/users/6"}], "http_etag": "\"4e2558f66257a9ba350f31812923b5fdfb3c50bf\"", + "http://localhost:9001/3.0/users/32"}], "http_etag": "\"8b5df2262f16ffca41ab740ae476b9b53c773a44\"", "start": 0, "total_size": 1}'} headers: - content-length: ['486'] + content-length: ['487'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -178,13 +178,13 @@ 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": - "\"76af7122d166660b40d1d25caee6686a6253732d\"", "list_id": "list.example.com", + "\"8a360ddee4a71566ff9fcb982ffc744189a0c5b2\"", "list_id": "list.example.com", "member_id": 34, "moderation_action": "accept", "role": "moderator", "self_link": - "http://localhost:9001/3.0/members/34", "user": "http://localhost:9001/3.0/users/7"}], - "http_etag": "\"c5ecb6493075f81740245a5cc8cebfdbc36b91bf\"", "start": 0, "total_size": + "http://localhost:9001/3.0/members/34", "user": "http://localhost:9001/3.0/users/33"}], + "http_etag": "\"ecc415089cb778dfb594cad0d8c21beeba3102b2\"", "start": 0, "total_size": 1}'} headers: - content-length: ['498'] + content-length: ['499'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -252,10 +252,10 @@ uri: http://localhost:9001/3.0/users/owner@example.com response: body: {string: !!python/unicode '{"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}'} + "\"bdba54b81678064437568ff4e8f9edad6efc2700\"", "is_server_owner": false, + "self_link": "http://localhost:9001/3.0/users/32", "user_id": 32}'} headers: - content-length: ['188'] + content-length: ['190'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -263,15 +263,15 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode GET - uri: http://localhost:9001/3.0/users/6/addresses + uri: http://localhost:9001/3.0/users/32/addresses response: body: {string: !!python/unicode '{"entries": [{"email": "owner@example.com", "http_etag": - "\"7efeccdd4edd0bed02cd2141365a115239f83be4\"", "original_email": "owner@example.com", + "\"1bc90eeb62d3c4046237d4949836179aa65b4d9a\"", "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/6"}], "http_etag": "\"a565f7d323e0a6ca5da35f6d965148fe4fe03fbb\"", + "user": "http://localhost:9001/3.0/users/32"}], "http_etag": "\"15f86407975b9b0d23264db1495165e1d31ebd91\"", "start": 0, "total_size": 1}'} headers: - content-length: ['390'] + content-length: ['391'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -297,13 +297,13 @@ uri: http://localhost:9001/3.0/lists/list.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": "\"10fbbb6fcd377277ad5981c151c7a25ced155d78\"", + "delivery_mode": "regular", "email": "owner@example.com", "http_etag": "\"79fd1f3b36b0ea0c90d066b8c6279d5af0538da5\"", "list_id": "list.example.com", "member_id": 33, "moderation_action": "accept", "role": "owner", "self_link": "http://localhost:9001/3.0/members/33", "user": - "http://localhost:9001/3.0/users/6"}], "http_etag": "\"4e2558f66257a9ba350f31812923b5fdfb3c50bf\"", + "http://localhost:9001/3.0/users/32"}], "http_etag": "\"8b5df2262f16ffca41ab740ae476b9b53c773a44\"", "start": 0, "total_size": 1}'} headers: - content-length: ['486'] + content-length: ['487'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -315,13 +315,13 @@ 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": - "\"76af7122d166660b40d1d25caee6686a6253732d\"", "list_id": "list.example.com", + "\"8a360ddee4a71566ff9fcb982ffc744189a0c5b2\"", "list_id": "list.example.com", "member_id": 34, "moderation_action": "accept", "role": "moderator", "self_link": - "http://localhost:9001/3.0/members/34", "user": "http://localhost:9001/3.0/users/7"}], - "http_etag": "\"c5ecb6493075f81740245a5cc8cebfdbc36b91bf\"", "start": 0, "total_size": + "http://localhost:9001/3.0/members/34", "user": "http://localhost:9001/3.0/users/33"}], + "http_etag": "\"ecc415089cb778dfb594cad0d8c21beeba3102b2\"", "start": 0, "total_size": 1}'} headers: - content-length: ['498'] + content-length: ['499'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -391,8 +391,53 @@ body: null headers: accept-encoding: ['gzip, deflate'] + method: !!python/unicode GET + uri: http://localhost:9001/3.0/domains + response: + body: {string: !!python/unicode '{"entries": [{"base_url": "http://example.com", + "description": null, "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", + "mail_host": "example.com", "self_link": "http://localhost:9001/3.0/domains/example.com", + "url_host": "example.com"}], "http_etag": "\"c385b155f8da284bf78dbe075e20f58a30c893ab\"", + "start": 0, "total_size": 1}'} + headers: + content-length: ['338'] + 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/list@example.com + uri: http://localhost:9001/3.0/domains/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 + response: + body: {string: !!python/unicode '{"entries": [{"created_on": "2005-08-01T07:49:23", + "http_etag": "\"bdba54b81678064437568ff4e8f9edad6efc2700\"", "is_server_owner": + false, "self_link": "http://localhost:9001/3.0/users/32", "user_id": 32}, + {"created_on": "2005-08-01T07:49:23", "http_etag": "\"193ede1fb8d445273173195352026184d3011303\"", + "is_server_owner": false, "self_link": "http://localhost:9001/3.0/users/33", + "user_id": 33}], "http_etag": "\"3045aa73c93f5fc892e0bdd8d2d921833183f841\"", + "start": 0, "total_size": 2}'} + headers: + content-length: ['487'] + 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/32 response: body: {string: !!python/unicode ''} headers: @@ -403,7 +448,7 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode DELETE - uri: http://localhost:9001/3.0/domains/example.com + uri: http://localhost:9001/3.0/users/33 response: body: {string: !!python/unicode ''} headers: diff --git a/src/postorius/tests/fixtures/vcr_cassettes/ListHeaderMatchesTest.test_edit.yaml b/src/postorius/tests/fixtures/vcr_cassettes/ListHeaderMatchesTest.test_edit.yaml index 7a8cd20..f42881c 100644 --- a/src/postorius/tests/fixtures/vcr_cassettes/ListHeaderMatchesTest.test_edit.yaml +++ b/src/postorius/tests/fixtures/vcr_cassettes/ListHeaderMatchesTest.test_edit.yaml @@ -102,10 +102,10 @@ uri: http://localhost:9001/3.0/users/owner@example.com response: body: {string: !!python/unicode '{"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}'} + "\"fd4a8232471e43dfae3b0d05f64acab9601f0005\"", "is_server_owner": false, + "self_link": "http://localhost:9001/3.0/users/34", "user_id": 34}'} headers: - content-length: ['188'] + content-length: ['190'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -113,15 +113,15 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode GET - uri: http://localhost:9001/3.0/users/6/addresses + uri: http://localhost:9001/3.0/users/34/addresses response: body: {string: !!python/unicode '{"entries": [{"email": "owner@example.com", "http_etag": - "\"7efeccdd4edd0bed02cd2141365a115239f83be4\"", "original_email": "owner@example.com", + "\"eced500b76ca28a2d1e1864f932cb92e3756609a\"", "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/6"}], "http_etag": "\"a565f7d323e0a6ca5da35f6d965148fe4fe03fbb\"", + "user": "http://localhost:9001/3.0/users/34"}], "http_etag": "\"4af626aed3eb4cfc9d83adc41bdfbe70a2db20f5\"", "start": 0, "total_size": 1}'} headers: - content-length: ['390'] + content-length: ['391'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -147,13 +147,13 @@ uri: http://localhost:9001/3.0/lists/list.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": "\"14ae019a8cfb05cd12df31fc108305b557b35218\"", + "delivery_mode": "regular", "email": "owner@example.com", "http_etag": "\"11aa3b2ec45f7c6c62f020da50bd59f7187cd630\"", "list_id": "list.example.com", "member_id": 35, "moderation_action": "accept", "role": "owner", "self_link": "http://localhost:9001/3.0/members/35", "user": - "http://localhost:9001/3.0/users/6"}], "http_etag": "\"63675f32453eb2cc497eb888104dc096dc002b35\"", + "http://localhost:9001/3.0/users/34"}], "http_etag": "\"262abded361b2eb3cd3b194b94fe942eeb49c422\"", "start": 0, "total_size": 1}'} headers: - content-length: ['486'] + content-length: ['487'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -165,13 +165,13 @@ 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": - "\"22e2e8b1fe1232879f0e77c8cee8d4e00aabacaa\"", "list_id": "list.example.com", + "\"b7fd9b54ec5d172d4e45a6c4e065566e81af6f74\"", "list_id": "list.example.com", "member_id": 36, "moderation_action": "accept", "role": "moderator", "self_link": - "http://localhost:9001/3.0/members/36", "user": "http://localhost:9001/3.0/users/7"}], - "http_etag": "\"2e0d99d79c5d3bd00bf2f953b35196d5d9c782e6\"", "start": 0, "total_size": + "http://localhost:9001/3.0/members/36", "user": "http://localhost:9001/3.0/users/35"}], + "http_etag": "\"3539c0f8af1261f260edcbebb797a40bfc843d9f\"", "start": 0, "total_size": 1}'} headers: - content-length: ['498'] + content-length: ['499'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -237,10 +237,10 @@ uri: http://localhost:9001/3.0/users/owner@example.com response: body: {string: !!python/unicode '{"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}'} + "\"fd4a8232471e43dfae3b0d05f64acab9601f0005\"", "is_server_owner": false, + "self_link": "http://localhost:9001/3.0/users/34", "user_id": 34}'} headers: - content-length: ['188'] + content-length: ['190'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -248,15 +248,15 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode GET - uri: http://localhost:9001/3.0/users/6/addresses + uri: http://localhost:9001/3.0/users/34/addresses response: body: {string: !!python/unicode '{"entries": [{"email": "owner@example.com", "http_etag": - "\"7efeccdd4edd0bed02cd2141365a115239f83be4\"", "original_email": "owner@example.com", + "\"eced500b76ca28a2d1e1864f932cb92e3756609a\"", "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/6"}], "http_etag": "\"a565f7d323e0a6ca5da35f6d965148fe4fe03fbb\"", + "user": "http://localhost:9001/3.0/users/34"}], "http_etag": "\"4af626aed3eb4cfc9d83adc41bdfbe70a2db20f5\"", "start": 0, "total_size": 1}'} headers: - content-length: ['390'] + content-length: ['391'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -282,13 +282,13 @@ uri: http://localhost:9001/3.0/lists/list.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": "\"14ae019a8cfb05cd12df31fc108305b557b35218\"", + "delivery_mode": "regular", "email": "owner@example.com", "http_etag": "\"11aa3b2ec45f7c6c62f020da50bd59f7187cd630\"", "list_id": "list.example.com", "member_id": 35, "moderation_action": "accept", "role": "owner", "self_link": "http://localhost:9001/3.0/members/35", "user": - "http://localhost:9001/3.0/users/6"}], "http_etag": "\"63675f32453eb2cc497eb888104dc096dc002b35\"", + "http://localhost:9001/3.0/users/34"}], "http_etag": "\"262abded361b2eb3cd3b194b94fe942eeb49c422\"", "start": 0, "total_size": 1}'} headers: - content-length: ['486'] + content-length: ['487'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -300,13 +300,13 @@ 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": - "\"22e2e8b1fe1232879f0e77c8cee8d4e00aabacaa\"", "list_id": "list.example.com", + "\"b7fd9b54ec5d172d4e45a6c4e065566e81af6f74\"", "list_id": "list.example.com", "member_id": 36, "moderation_action": "accept", "role": "moderator", "self_link": - "http://localhost:9001/3.0/members/36", "user": "http://localhost:9001/3.0/users/7"}], - "http_etag": "\"2e0d99d79c5d3bd00bf2f953b35196d5d9c782e6\"", "start": 0, "total_size": + "http://localhost:9001/3.0/members/36", "user": "http://localhost:9001/3.0/users/35"}], + "http_etag": "\"3539c0f8af1261f260edcbebb797a40bfc843d9f\"", "start": 0, "total_size": 1}'} headers: - content-length: ['498'] + content-length: ['499'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -376,8 +376,53 @@ body: null headers: accept-encoding: ['gzip, deflate'] + method: !!python/unicode GET + uri: http://localhost:9001/3.0/domains + response: + body: {string: !!python/unicode '{"entries": [{"base_url": "http://example.com", + "description": null, "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", + "mail_host": "example.com", "self_link": "http://localhost:9001/3.0/domains/example.com", + "url_host": "example.com"}], "http_etag": "\"c385b155f8da284bf78dbe075e20f58a30c893ab\"", + "start": 0, "total_size": 1}'} + headers: + content-length: ['338'] + 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/list@example.com + uri: http://localhost:9001/3.0/domains/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 + response: + body: {string: !!python/unicode '{"entries": [{"created_on": "2005-08-01T07:49:23", + "http_etag": "\"fd4a8232471e43dfae3b0d05f64acab9601f0005\"", "is_server_owner": + false, "self_link": "http://localhost:9001/3.0/users/34", "user_id": 34}, + {"created_on": "2005-08-01T07:49:23", "http_etag": "\"d69542e8aff488054a713dbf6e0865e72dc820cd\"", + "is_server_owner": false, "self_link": "http://localhost:9001/3.0/users/35", + "user_id": 35}], "http_etag": "\"9fe231f541c92c56e6dca97f28a98b93a06b4c8a\"", + "start": 0, "total_size": 2}'} + headers: + content-length: ['487'] + 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/34 response: body: {string: !!python/unicode ''} headers: @@ -388,7 +433,7 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode DELETE - uri: http://localhost:9001/3.0/domains/example.com + uri: http://localhost:9001/3.0/users/35 response: body: {string: !!python/unicode ''} headers: diff --git a/src/postorius/tests/fixtures/vcr_cassettes/ListHeaderMatchesTest.test_edit_empty.yaml b/src/postorius/tests/fixtures/vcr_cassettes/ListHeaderMatchesTest.test_edit_empty.yaml index a82354c..a1b717f 100644 --- a/src/postorius/tests/fixtures/vcr_cassettes/ListHeaderMatchesTest.test_edit_empty.yaml +++ b/src/postorius/tests/fixtures/vcr_cassettes/ListHeaderMatchesTest.test_edit_empty.yaml @@ -102,10 +102,10 @@ uri: http://localhost:9001/3.0/users/owner@example.com response: body: {string: !!python/unicode '{"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}'} + "\"ac340829f7769de8826d5096491b69aabe732430\"", "is_server_owner": false, + "self_link": "http://localhost:9001/3.0/users/36", "user_id": 36}'} headers: - content-length: ['188'] + content-length: ['190'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -113,15 +113,15 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode GET - uri: http://localhost:9001/3.0/users/6/addresses + uri: http://localhost:9001/3.0/users/36/addresses response: body: {string: !!python/unicode '{"entries": [{"email": "owner@example.com", "http_etag": - "\"7efeccdd4edd0bed02cd2141365a115239f83be4\"", "original_email": "owner@example.com", + "\"5972de5f62768320ad8f30f8b9bbb3e722503da4\"", "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/6"}], "http_etag": "\"a565f7d323e0a6ca5da35f6d965148fe4fe03fbb\"", + "user": "http://localhost:9001/3.0/users/36"}], "http_etag": "\"71173ea01e3db4ccdc68e9e1dedb0796403c43cc\"", "start": 0, "total_size": 1}'} headers: - content-length: ['390'] + content-length: ['391'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -147,13 +147,13 @@ uri: http://localhost:9001/3.0/lists/list.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": "\"252a421b550eda91cf5824541ee433093f4b3652\"", + "delivery_mode": "regular", "email": "owner@example.com", "http_etag": "\"d8e56f692d090cd8b37eb6c0fd0950a86a6614be\"", "list_id": "list.example.com", "member_id": 37, "moderation_action": "accept", "role": "owner", "self_link": "http://localhost:9001/3.0/members/37", "user": - "http://localhost:9001/3.0/users/6"}], "http_etag": "\"75b4ed79add9779446559c01fd805c3e8e0eb701\"", + "http://localhost:9001/3.0/users/36"}], "http_etag": "\"92c0084487ef50aaca6b4a6e9ddf930764d473a8\"", "start": 0, "total_size": 1}'} headers: - content-length: ['486'] + content-length: ['487'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -165,13 +165,13 @@ 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": - "\"d5eb3c63d3a73a73205ba4c5de2762d29743e781\"", "list_id": "list.example.com", + "\"36cf285674543e60f209a27c1cbac6a39ab11f0f\"", "list_id": "list.example.com", "member_id": 38, "moderation_action": "accept", "role": "moderator", "self_link": - "http://localhost:9001/3.0/members/38", "user": "http://localhost:9001/3.0/users/7"}], - "http_etag": "\"44a80b69d4cde0a5d2a1dbe88a213bfbbf15e321\"", "start": 0, "total_size": + "http://localhost:9001/3.0/members/38", "user": "http://localhost:9001/3.0/users/37"}], + "http_etag": "\"563349d7a240ecdabd2792c165b57080f3a2100e\"", "start": 0, "total_size": 1}'} headers: - content-length: ['498'] + content-length: ['499'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -241,8 +241,53 @@ body: null headers: accept-encoding: ['gzip, deflate'] + method: !!python/unicode GET + uri: http://localhost:9001/3.0/domains + response: + body: {string: !!python/unicode '{"entries": [{"base_url": "http://example.com", + "description": null, "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", + "mail_host": "example.com", "self_link": "http://localhost:9001/3.0/domains/example.com", + "url_host": "example.com"}], "http_etag": "\"c385b155f8da284bf78dbe075e20f58a30c893ab\"", + "start": 0, "total_size": 1}'} + headers: + content-length: ['338'] + 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/list@example.com + uri: http://localhost:9001/3.0/domains/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 + response: + body: {string: !!python/unicode '{"entries": [{"created_on": "2005-08-01T07:49:23", + "http_etag": "\"ac340829f7769de8826d5096491b69aabe732430\"", "is_server_owner": + false, "self_link": "http://localhost:9001/3.0/users/36", "user_id": 36}, + {"created_on": "2005-08-01T07:49:23", "http_etag": "\"746af64fb3c343d4cbe089a4b44d52e65fa99133\"", + "is_server_owner": false, "self_link": "http://localhost:9001/3.0/users/37", + "user_id": 37}], "http_etag": "\"952e0d05ab123ca95f79d6395b80b46c94f99165\"", + "start": 0, "total_size": 2}'} + headers: + content-length: ['487'] + 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/36 response: body: {string: !!python/unicode ''} headers: @@ -253,7 +298,7 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode DELETE - uri: http://localhost:9001/3.0/domains/example.com + uri: http://localhost:9001/3.0/users/37 response: body: {string: !!python/unicode ''} headers: diff --git a/src/postorius/tests/fixtures/vcr_cassettes/ListHeaderMatchesTest.test_move_down.yaml b/src/postorius/tests/fixtures/vcr_cassettes/ListHeaderMatchesTest.test_move_down.yaml index e10f880..c311ee3 100644 --- a/src/postorius/tests/fixtures/vcr_cassettes/ListHeaderMatchesTest.test_move_down.yaml +++ b/src/postorius/tests/fixtures/vcr_cassettes/ListHeaderMatchesTest.test_move_down.yaml @@ -128,10 +128,10 @@ uri: http://localhost:9001/3.0/users/owner@example.com response: body: {string: !!python/unicode '{"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}'} + "\"54d21bebe42e4c00bce51a7839dfb0bb7a74e22e\"", "is_server_owner": false, + "self_link": "http://localhost:9001/3.0/users/38", "user_id": 38}'} headers: - content-length: ['188'] + content-length: ['190'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -139,15 +139,15 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode GET - uri: http://localhost:9001/3.0/users/6/addresses + uri: http://localhost:9001/3.0/users/38/addresses response: body: {string: !!python/unicode '{"entries": [{"email": "owner@example.com", "http_etag": - "\"7efeccdd4edd0bed02cd2141365a115239f83be4\"", "original_email": "owner@example.com", + "\"a26e9bd668d7d558e477239c815d631bcbe51526\"", "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/6"}], "http_etag": "\"a565f7d323e0a6ca5da35f6d965148fe4fe03fbb\"", + "user": "http://localhost:9001/3.0/users/38"}], "http_etag": "\"2206fe8c8a7533538e9f89f1978b6adbebf4e7a2\"", "start": 0, "total_size": 1}'} headers: - content-length: ['390'] + content-length: ['391'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -173,13 +173,13 @@ uri: http://localhost:9001/3.0/lists/list.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": "\"dc50cb3ce5de9f03dece5facc59175ec612de2c6\"", + "delivery_mode": "regular", "email": "owner@example.com", "http_etag": "\"e3936c0db03ea980c0716ad7875be65777a8e8ce\"", "list_id": "list.example.com", "member_id": 39, "moderation_action": "accept", "role": "owner", "self_link": "http://localhost:9001/3.0/members/39", "user": - "http://localhost:9001/3.0/users/6"}], "http_etag": "\"83542615dedb3a18452d39fbdf2eed77376de2e2\"", + "http://localhost:9001/3.0/users/38"}], "http_etag": "\"9e42b9d128acf6521c9829e3f1c2c3d280f21ca7\"", "start": 0, "total_size": 1}'} headers: - content-length: ['486'] + content-length: ['487'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -191,13 +191,13 @@ 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": - "\"1ebb6cc4a571ac1938020a5f9bee871e03f964e2\"", "list_id": "list.example.com", + "\"eb98eb31f5a60a49e11b73cfdf1ba42afc2ce74e\"", "list_id": "list.example.com", "member_id": 40, "moderation_action": "accept", "role": "moderator", "self_link": - "http://localhost:9001/3.0/members/40", "user": "http://localhost:9001/3.0/users/7"}], - "http_etag": "\"f53af8d8492c7abdb01e092584e058dfb2212929\"", "start": 0, "total_size": + "http://localhost:9001/3.0/members/40", "user": "http://localhost:9001/3.0/users/39"}], + "http_etag": "\"7c9edcf6c9d52798bd7d81587a49ebcbcf2a3d4c\"", "start": 0, "total_size": 1}'} headers: - content-length: ['498'] + content-length: ['499'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -293,10 +293,10 @@ uri: http://localhost:9001/3.0/users/owner@example.com response: body: {string: !!python/unicode '{"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}'} + "\"54d21bebe42e4c00bce51a7839dfb0bb7a74e22e\"", "is_server_owner": false, + "self_link": "http://localhost:9001/3.0/users/38", "user_id": 38}'} headers: - content-length: ['188'] + content-length: ['190'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -304,15 +304,15 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode GET - uri: http://localhost:9001/3.0/users/6/addresses + uri: http://localhost:9001/3.0/users/38/addresses response: body: {string: !!python/unicode '{"entries": [{"email": "owner@example.com", "http_etag": - "\"7efeccdd4edd0bed02cd2141365a115239f83be4\"", "original_email": "owner@example.com", + "\"a26e9bd668d7d558e477239c815d631bcbe51526\"", "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/6"}], "http_etag": "\"a565f7d323e0a6ca5da35f6d965148fe4fe03fbb\"", + "user": "http://localhost:9001/3.0/users/38"}], "http_etag": "\"2206fe8c8a7533538e9f89f1978b6adbebf4e7a2\"", "start": 0, "total_size": 1}'} headers: - content-length: ['390'] + content-length: ['391'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -338,13 +338,13 @@ uri: http://localhost:9001/3.0/lists/list.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": "\"dc50cb3ce5de9f03dece5facc59175ec612de2c6\"", + "delivery_mode": "regular", "email": "owner@example.com", "http_etag": "\"e3936c0db03ea980c0716ad7875be65777a8e8ce\"", "list_id": "list.example.com", "member_id": 39, "moderation_action": "accept", "role": "owner", "self_link": "http://localhost:9001/3.0/members/39", "user": - "http://localhost:9001/3.0/users/6"}], "http_etag": "\"83542615dedb3a18452d39fbdf2eed77376de2e2\"", + "http://localhost:9001/3.0/users/38"}], "http_etag": "\"9e42b9d128acf6521c9829e3f1c2c3d280f21ca7\"", "start": 0, "total_size": 1}'} headers: - content-length: ['486'] + content-length: ['487'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -356,13 +356,13 @@ 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": - "\"1ebb6cc4a571ac1938020a5f9bee871e03f964e2\"", "list_id": "list.example.com", + "\"eb98eb31f5a60a49e11b73cfdf1ba42afc2ce74e\"", "list_id": "list.example.com", "member_id": 40, "moderation_action": "accept", "role": "moderator", "self_link": - "http://localhost:9001/3.0/members/40", "user": "http://localhost:9001/3.0/users/7"}], - "http_etag": "\"f53af8d8492c7abdb01e092584e058dfb2212929\"", "start": 0, "total_size": + "http://localhost:9001/3.0/members/40", "user": "http://localhost:9001/3.0/users/39"}], + "http_etag": "\"7c9edcf6c9d52798bd7d81587a49ebcbcf2a3d4c\"", "start": 0, "total_size": 1}'} headers: - content-length: ['498'] + content-length: ['499'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -444,8 +444,53 @@ body: null headers: accept-encoding: ['gzip, deflate'] + method: !!python/unicode GET + uri: http://localhost:9001/3.0/domains + response: + body: {string: !!python/unicode '{"entries": [{"base_url": "http://example.com", + "description": null, "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", + "mail_host": "example.com", "self_link": "http://localhost:9001/3.0/domains/example.com", + "url_host": "example.com"}], "http_etag": "\"c385b155f8da284bf78dbe075e20f58a30c893ab\"", + "start": 0, "total_size": 1}'} + headers: + content-length: ['338'] + 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/list@example.com + uri: http://localhost:9001/3.0/domains/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 + response: + body: {string: !!python/unicode '{"entries": [{"created_on": "2005-08-01T07:49:23", + "http_etag": "\"54d21bebe42e4c00bce51a7839dfb0bb7a74e22e\"", "is_server_owner": + false, "self_link": "http://localhost:9001/3.0/users/38", "user_id": 38}, + {"created_on": "2005-08-01T07:49:23", "http_etag": "\"cf8014263ef08f63a4cfea4d0d8b0170e725df07\"", + "is_server_owner": false, "self_link": "http://localhost:9001/3.0/users/39", + "user_id": 39}], "http_etag": "\"c4ba58c6fd7da115153a928a782f61b7f1f02690\"", + "start": 0, "total_size": 2}'} + headers: + content-length: ['487'] + 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/38 response: body: {string: !!python/unicode ''} headers: @@ -456,7 +501,7 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode DELETE - uri: http://localhost:9001/3.0/domains/example.com + uri: http://localhost:9001/3.0/users/39 response: body: {string: !!python/unicode ''} headers: diff --git a/src/postorius/tests/fixtures/vcr_cassettes/ListHeaderMatchesTest.test_move_up.yaml b/src/postorius/tests/fixtures/vcr_cassettes/ListHeaderMatchesTest.test_move_up.yaml index 9b3f1a8..e6014cd 100644 --- a/src/postorius/tests/fixtures/vcr_cassettes/ListHeaderMatchesTest.test_move_up.yaml +++ b/src/postorius/tests/fixtures/vcr_cassettes/ListHeaderMatchesTest.test_move_up.yaml @@ -128,10 +128,10 @@ uri: http://localhost:9001/3.0/users/owner@example.com response: body: {string: !!python/unicode '{"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}'} + "\"2a531149c67abd4d7972f411361758c9f4235bb1\"", "is_server_owner": false, + "self_link": "http://localhost:9001/3.0/users/40", "user_id": 40}'} headers: - content-length: ['188'] + content-length: ['190'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -139,15 +139,15 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode GET - uri: http://localhost:9001/3.0/users/6/addresses + uri: http://localhost:9001/3.0/users/40/addresses response: body: {string: !!python/unicode '{"entries": [{"email": "owner@example.com", "http_etag": - "\"7efeccdd4edd0bed02cd2141365a115239f83be4\"", "original_email": "owner@example.com", + "\"d46d4092496427eee6ce9d57947d874759f5c06d\"", "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/6"}], "http_etag": "\"a565f7d323e0a6ca5da35f6d965148fe4fe03fbb\"", + "user": "http://localhost:9001/3.0/users/40"}], "http_etag": "\"270f6bf3f2bbf2a7366878be2cd8e790ab21a5e6\"", "start": 0, "total_size": 1}'} headers: - content-length: ['390'] + content-length: ['391'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -173,13 +173,13 @@ uri: http://localhost:9001/3.0/lists/list.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": "\"92b61a0ee84f80a7f4c676d473ffb124d9df53a4\"", + "delivery_mode": "regular", "email": "owner@example.com", "http_etag": "\"800ee69dd1c2ef623c00cb353cdf3d3fee487403\"", "list_id": "list.example.com", "member_id": 41, "moderation_action": "accept", "role": "owner", "self_link": "http://localhost:9001/3.0/members/41", "user": - "http://localhost:9001/3.0/users/6"}], "http_etag": "\"b8df021395e3259776c0d9d79f95713c3b898de0\"", + "http://localhost:9001/3.0/users/40"}], "http_etag": "\"baed3bfcd7a4c79091509597578d1b446a346352\"", "start": 0, "total_size": 1}'} headers: - content-length: ['486'] + content-length: ['487'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -191,13 +191,13 @@ 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": - "\"592cf4e14d8eb96c825f2e9b008665edd020bad7\"", "list_id": "list.example.com", + "\"d727e7b34147b93c5458559682fd8476930b7617\"", "list_id": "list.example.com", "member_id": 42, "moderation_action": "accept", "role": "moderator", "self_link": - "http://localhost:9001/3.0/members/42", "user": "http://localhost:9001/3.0/users/7"}], - "http_etag": "\"9f0773a57c53447b61d6067bb9901272da4a0d7c\"", "start": 0, "total_size": + "http://localhost:9001/3.0/members/42", "user": "http://localhost:9001/3.0/users/41"}], + "http_etag": "\"7379aa4f6683700c261b5d50bc06560af06a42dd\"", "start": 0, "total_size": 1}'} headers: - content-length: ['498'] + content-length: ['499'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -293,10 +293,10 @@ uri: http://localhost:9001/3.0/users/owner@example.com response: body: {string: !!python/unicode '{"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}'} + "\"2a531149c67abd4d7972f411361758c9f4235bb1\"", "is_server_owner": false, + "self_link": "http://localhost:9001/3.0/users/40", "user_id": 40}'} headers: - content-length: ['188'] + content-length: ['190'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -304,15 +304,15 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode GET - uri: http://localhost:9001/3.0/users/6/addresses + uri: http://localhost:9001/3.0/users/40/addresses response: body: {string: !!python/unicode '{"entries": [{"email": "owner@example.com", "http_etag": - "\"7efeccdd4edd0bed02cd2141365a115239f83be4\"", "original_email": "owner@example.com", + "\"d46d4092496427eee6ce9d57947d874759f5c06d\"", "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/6"}], "http_etag": "\"a565f7d323e0a6ca5da35f6d965148fe4fe03fbb\"", + "user": "http://localhost:9001/3.0/users/40"}], "http_etag": "\"270f6bf3f2bbf2a7366878be2cd8e790ab21a5e6\"", "start": 0, "total_size": 1}'} headers: - content-length: ['390'] + content-length: ['391'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -338,13 +338,13 @@ uri: http://localhost:9001/3.0/lists/list.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": "\"92b61a0ee84f80a7f4c676d473ffb124d9df53a4\"", + "delivery_mode": "regular", "email": "owner@example.com", "http_etag": "\"800ee69dd1c2ef623c00cb353cdf3d3fee487403\"", "list_id": "list.example.com", "member_id": 41, "moderation_action": "accept", "role": "owner", "self_link": "http://localhost:9001/3.0/members/41", "user": - "http://localhost:9001/3.0/users/6"}], "http_etag": "\"b8df021395e3259776c0d9d79f95713c3b898de0\"", + "http://localhost:9001/3.0/users/40"}], "http_etag": "\"baed3bfcd7a4c79091509597578d1b446a346352\"", "start": 0, "total_size": 1}'} headers: - content-length: ['486'] + content-length: ['487'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -356,13 +356,13 @@ 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": - "\"592cf4e14d8eb96c825f2e9b008665edd020bad7\"", "list_id": "list.example.com", + "\"d727e7b34147b93c5458559682fd8476930b7617\"", "list_id": "list.example.com", "member_id": 42, "moderation_action": "accept", "role": "moderator", "self_link": - "http://localhost:9001/3.0/members/42", "user": "http://localhost:9001/3.0/users/7"}], - "http_etag": "\"9f0773a57c53447b61d6067bb9901272da4a0d7c\"", "start": 0, "total_size": + "http://localhost:9001/3.0/members/42", "user": "http://localhost:9001/3.0/users/41"}], + "http_etag": "\"7379aa4f6683700c261b5d50bc06560af06a42dd\"", "start": 0, "total_size": 1}'} headers: - content-length: ['498'] + content-length: ['499'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -444,8 +444,53 @@ body: null headers: accept-encoding: ['gzip, deflate'] + method: !!python/unicode GET + uri: http://localhost:9001/3.0/domains + response: + body: {string: !!python/unicode '{"entries": [{"base_url": "http://example.com", + "description": null, "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", + "mail_host": "example.com", "self_link": "http://localhost:9001/3.0/domains/example.com", + "url_host": "example.com"}], "http_etag": "\"c385b155f8da284bf78dbe075e20f58a30c893ab\"", + "start": 0, "total_size": 1}'} + headers: + content-length: ['338'] + 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/list@example.com + uri: http://localhost:9001/3.0/domains/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 + response: + body: {string: !!python/unicode '{"entries": [{"created_on": "2005-08-01T07:49:23", + "http_etag": "\"2a531149c67abd4d7972f411361758c9f4235bb1\"", "is_server_owner": + false, "self_link": "http://localhost:9001/3.0/users/40", "user_id": 40}, + {"created_on": "2005-08-01T07:49:23", "http_etag": "\"6071df37f4a4cb86be05c478f66ec256e9e02896\"", + "is_server_owner": false, "self_link": "http://localhost:9001/3.0/users/41", + "user_id": 41}], "http_etag": "\"bbc894a0652b58e21a2ca3f521fb7083034438a4\"", + "start": 0, "total_size": 2}'} + headers: + content-length: ['487'] + 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/40 response: body: {string: !!python/unicode ''} headers: @@ -456,7 +501,7 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode DELETE - uri: http://localhost:9001/3.0/domains/example.com + uri: http://localhost:9001/3.0/users/41 response: body: {string: !!python/unicode ''} headers: diff --git a/src/postorius/tests/fixtures/vcr_cassettes/ListHeaderMatchesTest.test_not_accessible_for_moderator.yaml b/src/postorius/tests/fixtures/vcr_cassettes/ListHeaderMatchesTest.test_not_accessible_for_moderator.yaml index 1c829c5..1da7621 100644 --- a/src/postorius/tests/fixtures/vcr_cassettes/ListHeaderMatchesTest.test_not_accessible_for_moderator.yaml +++ b/src/postorius/tests/fixtures/vcr_cassettes/ListHeaderMatchesTest.test_not_accessible_for_moderator.yaml @@ -89,10 +89,10 @@ uri: http://localhost:9001/3.0/users/moderator@example.com response: body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag": - "\"c7360c029a83c97672ca38dd8b008d48e05949a6\"", "is_server_owner": false, - "self_link": "http://localhost:9001/3.0/users/7", "user_id": 7}'} + "\"8baa884afd4f798ea7a841b7db104287b4f1175a\"", "is_server_owner": false, + "self_link": "http://localhost:9001/3.0/users/43", "user_id": 43}'} headers: - content-length: ['188'] + content-length: ['190'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -100,16 +100,16 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode GET - uri: http://localhost:9001/3.0/users/7/addresses + uri: http://localhost:9001/3.0/users/43/addresses response: body: {string: !!python/unicode '{"entries": [{"email": "moderator@example.com", - "http_etag": "\"dc9e6ab7f685df3bdee82a1b48abcc345c24c317\"", "original_email": + "http_etag": "\"05b5173a50d5b7abb128797de5757ce026b442d8\"", "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/7"}], - "http_etag": "\"61e6b2b734fab9e85bac3022e2728ddca6d73b95\"", "start": 0, "total_size": + "http://localhost:9001/3.0/addresses/moderator@example.com", "user": "http://localhost:9001/3.0/users/43"}], + "http_etag": "\"098999e64fc0a20bc89cc20c71e2c3846f509a3f\"", "start": 0, "total_size": 1}'} headers: - content-length: ['402'] + content-length: ['403'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -135,13 +135,13 @@ uri: http://localhost:9001/3.0/lists/list.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": "\"c9f6c0d587e4143610eeb960cb412de154275c92\"", + "delivery_mode": "regular", "email": "owner@example.com", "http_etag": "\"ccb5c97101db8fca638c49ad10d73597d97e2dde\"", "list_id": "list.example.com", "member_id": 43, "moderation_action": "accept", "role": "owner", "self_link": "http://localhost:9001/3.0/members/43", "user": - "http://localhost:9001/3.0/users/6"}], "http_etag": "\"154cf2b68807d6472e0cb8c3591f6254761f67c4\"", + "http://localhost:9001/3.0/users/42"}], "http_etag": "\"0318965e405d27b3f804e4c46c947adcc706afc9\"", "start": 0, "total_size": 1}'} headers: - content-length: ['486'] + content-length: ['487'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -153,13 +153,29 @@ 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": - "\"8c3456470fb93b6d3c15197902b2f4a708b52a54\"", "list_id": "list.example.com", + "\"677f56b01db16ea41b4a60d686ce3a700d363e66\"", "list_id": "list.example.com", "member_id": 44, "moderation_action": "accept", "role": "moderator", "self_link": - "http://localhost:9001/3.0/members/44", "user": "http://localhost:9001/3.0/users/7"}], - "http_etag": "\"803b725ac7063bb6a16fe45ed318ed5d22cb92d1\"", "start": 0, "total_size": + "http://localhost:9001/3.0/members/44", "user": "http://localhost:9001/3.0/users/43"}], + "http_etag": "\"7287f4690c390bafa754e197b1459367d4926e7d\"", "start": 0, "total_size": 1}'} headers: - content-length: ['498'] + content-length: ['499'] + 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/domains + response: + body: {string: !!python/unicode '{"entries": [{"base_url": "http://example.com", + "description": null, "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", + "mail_host": "example.com", "self_link": "http://localhost:9001/3.0/domains/example.com", + "url_host": "example.com"}], "http_etag": "\"c385b155f8da284bf78dbe075e20f58a30c893ab\"", + "start": 0, "total_size": 1}'} + headers: + content-length: ['338'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -167,7 +183,36 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode DELETE - uri: http://localhost:9001/3.0/lists/list@example.com + uri: http://localhost:9001/3.0/domains/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 + response: + body: {string: !!python/unicode '{"entries": [{"created_on": "2005-08-01T07:49:23", + "http_etag": "\"61ff2561963f4a48a5bbe30d2c4168b52c485752\"", "is_server_owner": + false, "self_link": "http://localhost:9001/3.0/users/42", "user_id": 42}, + {"created_on": "2005-08-01T07:49:23", "http_etag": "\"8baa884afd4f798ea7a841b7db104287b4f1175a\"", + "is_server_owner": false, "self_link": "http://localhost:9001/3.0/users/43", + "user_id": 43}], "http_etag": "\"8a9dcb4284924eb285aaef3b09d5d5c9d7cdf2e0\"", + "start": 0, "total_size": 2}'} + headers: + content-length: ['487'] + 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/42 response: body: {string: !!python/unicode ''} headers: @@ -178,7 +223,7 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode DELETE - uri: http://localhost:9001/3.0/domains/example.com + uri: http://localhost:9001/3.0/users/43 response: body: {string: !!python/unicode ''} headers: diff --git a/src/postorius/tests/fixtures/vcr_cassettes/ListHeaderMatchesTest.test_page_accessible_for_owner.yaml b/src/postorius/tests/fixtures/vcr_cassettes/ListHeaderMatchesTest.test_page_accessible_for_owner.yaml index 2ef4a0b..3355cc9 100644 --- a/src/postorius/tests/fixtures/vcr_cassettes/ListHeaderMatchesTest.test_page_accessible_for_owner.yaml +++ b/src/postorius/tests/fixtures/vcr_cassettes/ListHeaderMatchesTest.test_page_accessible_for_owner.yaml @@ -89,10 +89,10 @@ uri: http://localhost:9001/3.0/users/owner@example.com response: body: {string: !!python/unicode '{"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}'} + "\"6d612d2536821ffdb84398d1385fa03883c014cf\"", "is_server_owner": false, + "self_link": "http://localhost:9001/3.0/users/44", "user_id": 44}'} headers: - content-length: ['188'] + content-length: ['190'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -100,15 +100,15 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode GET - uri: http://localhost:9001/3.0/users/6/addresses + uri: http://localhost:9001/3.0/users/44/addresses response: body: {string: !!python/unicode '{"entries": [{"email": "owner@example.com", "http_etag": - "\"7efeccdd4edd0bed02cd2141365a115239f83be4\"", "original_email": "owner@example.com", + "\"cff09a1be48550e876d14ab7286cefe50fc753f6\"", "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/6"}], "http_etag": "\"a565f7d323e0a6ca5da35f6d965148fe4fe03fbb\"", + "user": "http://localhost:9001/3.0/users/44"}], "http_etag": "\"1b8a52f8f53aae1ac498f78a341b888b07183822\"", "start": 0, "total_size": 1}'} headers: - content-length: ['390'] + content-length: ['391'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -134,13 +134,13 @@ uri: http://localhost:9001/3.0/lists/list.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": "\"8f7fc3a67de52fc8d1e2d49c1bb3e03865c4db34\"", + "delivery_mode": "regular", "email": "owner@example.com", "http_etag": "\"75458695c72556e539dad3949a3bf27730dbb213\"", "list_id": "list.example.com", "member_id": 45, "moderation_action": "accept", "role": "owner", "self_link": "http://localhost:9001/3.0/members/45", "user": - "http://localhost:9001/3.0/users/6"}], "http_etag": "\"55f57eddd9af2d55ccbf134c81919642eb11458b\"", + "http://localhost:9001/3.0/users/44"}], "http_etag": "\"6e38636cf93bee28a0bea28dad76e1bfe7fddc16\"", "start": 0, "total_size": 1}'} headers: - content-length: ['486'] + content-length: ['487'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -152,13 +152,13 @@ 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": - "\"d78a43f13bb30795f544ebc72cfe44d3d13fc859\"", "list_id": "list.example.com", + "\"e2e45c4000d2fb18325a645d87499132b86cda06\"", "list_id": "list.example.com", "member_id": 46, "moderation_action": "accept", "role": "moderator", "self_link": - "http://localhost:9001/3.0/members/46", "user": "http://localhost:9001/3.0/users/7"}], - "http_etag": "\"f3465fb200ee45cc8210495679d764339ef216d2\"", "start": 0, "total_size": + "http://localhost:9001/3.0/members/46", "user": "http://localhost:9001/3.0/users/45"}], + "http_etag": "\"bf11d1b46b03c88e164b3eb2ae27f63ad255bc98\"", "start": 0, "total_size": 1}'} headers: - content-length: ['498'] + content-length: ['499'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -193,8 +193,53 @@ body: null headers: accept-encoding: ['gzip, deflate'] + method: !!python/unicode GET + uri: http://localhost:9001/3.0/domains + response: + body: {string: !!python/unicode '{"entries": [{"base_url": "http://example.com", + "description": null, "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", + "mail_host": "example.com", "self_link": "http://localhost:9001/3.0/domains/example.com", + "url_host": "example.com"}], "http_etag": "\"c385b155f8da284bf78dbe075e20f58a30c893ab\"", + "start": 0, "total_size": 1}'} + headers: + content-length: ['338'] + 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/list@example.com + uri: http://localhost:9001/3.0/domains/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 + response: + body: {string: !!python/unicode '{"entries": [{"created_on": "2005-08-01T07:49:23", + "http_etag": "\"6d612d2536821ffdb84398d1385fa03883c014cf\"", "is_server_owner": + false, "self_link": "http://localhost:9001/3.0/users/44", "user_id": 44}, + {"created_on": "2005-08-01T07:49:23", "http_etag": "\"78e04703c01d88c72de40b7ec588160678a8be92\"", + "is_server_owner": false, "self_link": "http://localhost:9001/3.0/users/45", + "user_id": 45}], "http_etag": "\"5cfabd1bf64a7175b946ee3af40c94a0254fa024\"", + "start": 0, "total_size": 2}'} + headers: + content-length: ['487'] + 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/44 response: body: {string: !!python/unicode ''} headers: @@ -205,7 +250,7 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode DELETE - uri: http://localhost:9001/3.0/domains/example.com + uri: http://localhost:9001/3.0/users/45 response: body: {string: !!python/unicode ''} headers: diff --git a/src/postorius/tests/fixtures/vcr_cassettes/ListHeaderMatchesTest.test_page_accessible_for_superuser.yaml b/src/postorius/tests/fixtures/vcr_cassettes/ListHeaderMatchesTest.test_page_accessible_for_superuser.yaml index a0f53f2..f587a55 100644 --- a/src/postorius/tests/fixtures/vcr_cassettes/ListHeaderMatchesTest.test_page_accessible_for_superuser.yaml +++ b/src/postorius/tests/fixtures/vcr_cassettes/ListHeaderMatchesTest.test_page_accessible_for_superuser.yaml @@ -88,29 +88,11 @@ method: !!python/unicode GET uri: http://localhost:9001/3.0/users/su@example.com response: - body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag": - "\"bb1c2e6094a96b17e2d5dbf487291f7667f69f75\"", "is_server_owner": false, - "self_link": "http://localhost:9001/3.0/users/3", "user_id": 3}'} + body: {string: !!python/unicode 404 Not Found} headers: - content-length: ['188'] + content-length: ['13'] 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/3/addresses - response: - body: {string: !!python/unicode '{"entries": [{"email": "su@example.com", "http_etag": - "\"91c297417f4c33cf707148d031e79b6cb316f158\"", "original_email": "su@example.com", - "registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/su@example.com", - "user": "http://localhost:9001/3.0/users/3"}], "http_etag": "\"e9a7c409726b93f93aaf643fce49558cf27237e1\"", - "start": 0, "total_size": 1}'} - headers: - content-length: ['381'] - content-type: [application/json; charset=utf-8] - status: {code: 200, message: OK} + status: {code: 404, message: Not Found} - request: body: null headers: @@ -143,8 +125,53 @@ body: null headers: accept-encoding: ['gzip, deflate'] + method: !!python/unicode GET + uri: http://localhost:9001/3.0/domains + response: + body: {string: !!python/unicode '{"entries": [{"base_url": "http://example.com", + "description": null, "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", + "mail_host": "example.com", "self_link": "http://localhost:9001/3.0/domains/example.com", + "url_host": "example.com"}], "http_etag": "\"c385b155f8da284bf78dbe075e20f58a30c893ab\"", + "start": 0, "total_size": 1}'} + headers: + content-length: ['338'] + 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/list@example.com + uri: http://localhost:9001/3.0/domains/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 + response: + body: {string: !!python/unicode '{"entries": [{"created_on": "2005-08-01T07:49:23", + "http_etag": "\"edcea41adfd3150fc44a03bedd6fd8873a9ef393\"", "is_server_owner": + false, "self_link": "http://localhost:9001/3.0/users/46", "user_id": 46}, + {"created_on": "2005-08-01T07:49:23", "http_etag": "\"b104730ccfabfd68697319f733687494ff23079c\"", + "is_server_owner": false, "self_link": "http://localhost:9001/3.0/users/47", + "user_id": 47}], "http_etag": "\"0bac402a67c86d02007fc1bb57189300d4ea9280\"", + "start": 0, "total_size": 2}'} + headers: + content-length: ['487'] + 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/46 response: body: {string: !!python/unicode ''} headers: @@ -155,7 +182,7 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode DELETE - uri: http://localhost:9001/3.0/domains/example.com + uri: http://localhost:9001/3.0/users/47 response: body: {string: !!python/unicode ''} headers: diff --git a/src/postorius/tests/fixtures/vcr_cassettes/ListHeaderMatchesTest.test_page_not_accessible_for_unprivileged_users.yaml b/src/postorius/tests/fixtures/vcr_cassettes/ListHeaderMatchesTest.test_page_not_accessible_for_unprivileged_users.yaml index 2a66a03..cf865bc 100644 --- a/src/postorius/tests/fixtures/vcr_cassettes/ListHeaderMatchesTest.test_page_not_accessible_for_unprivileged_users.yaml +++ b/src/postorius/tests/fixtures/vcr_cassettes/ListHeaderMatchesTest.test_page_not_accessible_for_unprivileged_users.yaml @@ -116,13 +116,13 @@ uri: http://localhost:9001/3.0/lists/list.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": "\"f9fd342fceee59923e68847bca8b082069bbb410\"", + "delivery_mode": "regular", "email": "owner@example.com", "http_etag": "\"ffbe44a35a1b261f508f66635ecf56a9c579f27c\"", "list_id": "list.example.com", "member_id": 49, "moderation_action": "accept", "role": "owner", "self_link": "http://localhost:9001/3.0/members/49", "user": - "http://localhost:9001/3.0/users/6"}], "http_etag": "\"accce8d55e0b6b611dedfc7e51af055f1879701e\"", + "http://localhost:9001/3.0/users/48"}], "http_etag": "\"e819d7ca10774953013a9d884787e99dcbcf6adb\"", "start": 0, "total_size": 1}'} headers: - content-length: ['486'] + content-length: ['487'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -134,13 +134,29 @@ 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": - "\"44774439cb4a8c773729c867bd17defcefd63ddd\"", "list_id": "list.example.com", + "\"3326b8258e51a58397f5165dc11f151f767dd265\"", "list_id": "list.example.com", "member_id": 50, "moderation_action": "accept", "role": "moderator", "self_link": - "http://localhost:9001/3.0/members/50", "user": "http://localhost:9001/3.0/users/7"}], - "http_etag": "\"8419ff2e40e8a68aa07ffaaa3fe3d5be0ff636e9\"", "start": 0, "total_size": + "http://localhost:9001/3.0/members/50", "user": "http://localhost:9001/3.0/users/49"}], + "http_etag": "\"14cd323b60a69cd6f2bd9d02cf71efb028c77f3f\"", "start": 0, "total_size": 1}'} headers: - content-length: ['498'] + content-length: ['499'] + 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/domains + response: + body: {string: !!python/unicode '{"entries": [{"base_url": "http://example.com", + "description": null, "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", + "mail_host": "example.com", "self_link": "http://localhost:9001/3.0/domains/example.com", + "url_host": "example.com"}], "http_etag": "\"c385b155f8da284bf78dbe075e20f58a30c893ab\"", + "start": 0, "total_size": 1}'} + headers: + content-length: ['338'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -148,7 +164,36 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode DELETE - uri: http://localhost:9001/3.0/lists/list@example.com + uri: http://localhost:9001/3.0/domains/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 + response: + body: {string: !!python/unicode '{"entries": [{"created_on": "2005-08-01T07:49:23", + "http_etag": "\"c709c54bbc1563a8f27c82c362599fd351d2e019\"", "is_server_owner": + false, "self_link": "http://localhost:9001/3.0/users/48", "user_id": 48}, + {"created_on": "2005-08-01T07:49:23", "http_etag": "\"60ed2ec4e71f0aea8fec40d17c53ac324288d285\"", + "is_server_owner": false, "self_link": "http://localhost:9001/3.0/users/49", + "user_id": 49}], "http_etag": "\"21c9c73596319c76559cc4784111e72bee67d18b\"", + "start": 0, "total_size": 2}'} + headers: + content-length: ['487'] + 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/48 response: body: {string: !!python/unicode ''} headers: @@ -159,7 +204,7 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode DELETE - uri: http://localhost:9001/3.0/domains/example.com + uri: http://localhost:9001/3.0/users/49 response: body: {string: !!python/unicode ''} headers: diff --git a/src/postorius/tests/fixtures/vcr_cassettes/ListHeaderMatchesTest.test_page_not_accessible_if_not_logged_in.yaml b/src/postorius/tests/fixtures/vcr_cassettes/ListHeaderMatchesTest.test_page_not_accessible_if_not_logged_in.yaml index 7a69912..645de3f 100644 --- a/src/postorius/tests/fixtures/vcr_cassettes/ListHeaderMatchesTest.test_page_not_accessible_if_not_logged_in.yaml +++ b/src/postorius/tests/fixtures/vcr_cassettes/ListHeaderMatchesTest.test_page_not_accessible_if_not_logged_in.yaml @@ -85,8 +85,53 @@ body: null headers: accept-encoding: ['gzip, deflate'] + method: !!python/unicode GET + uri: http://localhost:9001/3.0/domains + response: + body: {string: !!python/unicode '{"entries": [{"base_url": "http://example.com", + "description": null, "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", + "mail_host": "example.com", "self_link": "http://localhost:9001/3.0/domains/example.com", + "url_host": "example.com"}], "http_etag": "\"c385b155f8da284bf78dbe075e20f58a30c893ab\"", + "start": 0, "total_size": 1}'} + headers: + content-length: ['338'] + 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/list@example.com + uri: http://localhost:9001/3.0/domains/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 + response: + body: {string: !!python/unicode '{"entries": [{"created_on": "2005-08-01T07:49:23", + "http_etag": "\"1cacbb8ba8546f2629af4198fab5277b01fdea0a\"", "is_server_owner": + false, "self_link": "http://localhost:9001/3.0/users/50", "user_id": 50}, + {"created_on": "2005-08-01T07:49:23", "http_etag": "\"4a285f1759e20051233a71c5eb314755ec29e5cf\"", + "is_server_owner": false, "self_link": "http://localhost:9001/3.0/users/51", + "user_id": 51}], "http_etag": "\"36244f3e900255c4f1f3abbfee87ff35c9c9306e\"", + "start": 0, "total_size": 2}'} + headers: + content-length: ['487'] + 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/50 response: body: {string: !!python/unicode ''} headers: @@ -97,7 +142,7 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode DELETE - uri: http://localhost:9001/3.0/domains/example.com + uri: http://localhost:9001/3.0/users/51 response: body: {string: !!python/unicode ''} headers: diff --git a/src/postorius/tests/fixtures/vcr_cassettes/ListHeaderMatchesTest.test_same_order.yaml b/src/postorius/tests/fixtures/vcr_cassettes/ListHeaderMatchesTest.test_same_order.yaml index 3fff6c6..2946bdd 100644 --- a/src/postorius/tests/fixtures/vcr_cassettes/ListHeaderMatchesTest.test_same_order.yaml +++ b/src/postorius/tests/fixtures/vcr_cassettes/ListHeaderMatchesTest.test_same_order.yaml @@ -115,10 +115,10 @@ uri: http://localhost:9001/3.0/users/owner@example.com response: body: {string: !!python/unicode '{"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}'} + "\"694e7c8ddb0f934aebafa60d0d62e309edd4dff2\"", "is_server_owner": false, + "self_link": "http://localhost:9001/3.0/users/52", "user_id": 52}'} headers: - content-length: ['188'] + content-length: ['190'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -126,15 +126,15 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode GET - uri: http://localhost:9001/3.0/users/6/addresses + uri: http://localhost:9001/3.0/users/52/addresses response: body: {string: !!python/unicode '{"entries": [{"email": "owner@example.com", "http_etag": - "\"7efeccdd4edd0bed02cd2141365a115239f83be4\"", "original_email": "owner@example.com", + "\"de19cf781de41cc171b98021d827eb6790c32b5f\"", "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/6"}], "http_etag": "\"a565f7d323e0a6ca5da35f6d965148fe4fe03fbb\"", + "user": "http://localhost:9001/3.0/users/52"}], "http_etag": "\"30267a5757a2afc185217d055de138f74054c614\"", "start": 0, "total_size": 1}'} headers: - content-length: ['390'] + content-length: ['391'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -160,13 +160,13 @@ uri: http://localhost:9001/3.0/lists/list.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": "\"5539713a0257fa9391b364f09fa8d9ed4f01a02e\"", + "delivery_mode": "regular", "email": "owner@example.com", "http_etag": "\"cc06135b6b5206b385a2db183e6084c7a5848160\"", "list_id": "list.example.com", "member_id": 53, "moderation_action": "accept", "role": "owner", "self_link": "http://localhost:9001/3.0/members/53", "user": - "http://localhost:9001/3.0/users/6"}], "http_etag": "\"725d292c971893d17e0b86fa0e154e3ab97e3ed1\"", + "http://localhost:9001/3.0/users/52"}], "http_etag": "\"981a4c5149e11de66815c3c3fb85475488774c7b\"", "start": 0, "total_size": 1}'} headers: - content-length: ['486'] + content-length: ['487'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -178,13 +178,13 @@ 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": - "\"ffaa34a2dc22f6a5074d9e423c5c3982eb8bbeba\"", "list_id": "list.example.com", + "\"02a54f369b42bdaa89958c4621da5961c2adc249\"", "list_id": "list.example.com", "member_id": 54, "moderation_action": "accept", "role": "moderator", "self_link": - "http://localhost:9001/3.0/members/54", "user": "http://localhost:9001/3.0/users/7"}], - "http_etag": "\"5c4526ab4a817ab9d98d5d5a8c0e08603131bbcb\"", "start": 0, "total_size": + "http://localhost:9001/3.0/members/54", "user": "http://localhost:9001/3.0/users/53"}], + "http_etag": "\"83ef06dd944684c7cb9637d2b7f7cad96e6de5bc\"", "start": 0, "total_size": 1}'} headers: - content-length: ['498'] + content-length: ['499'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -260,8 +260,53 @@ body: null headers: accept-encoding: ['gzip, deflate'] + method: !!python/unicode GET + uri: http://localhost:9001/3.0/domains + response: + body: {string: !!python/unicode '{"entries": [{"base_url": "http://example.com", + "description": null, "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", + "mail_host": "example.com", "self_link": "http://localhost:9001/3.0/domains/example.com", + "url_host": "example.com"}], "http_etag": "\"c385b155f8da284bf78dbe075e20f58a30c893ab\"", + "start": 0, "total_size": 1}'} + headers: + content-length: ['338'] + 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/list@example.com + uri: http://localhost:9001/3.0/domains/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 + response: + body: {string: !!python/unicode '{"entries": [{"created_on": "2005-08-01T07:49:23", + "http_etag": "\"694e7c8ddb0f934aebafa60d0d62e309edd4dff2\"", "is_server_owner": + false, "self_link": "http://localhost:9001/3.0/users/52", "user_id": 52}, + {"created_on": "2005-08-01T07:49:23", "http_etag": "\"3c60293ff607ebcfa12ba62a87e1117e055aaf2c\"", + "is_server_owner": false, "self_link": "http://localhost:9001/3.0/users/53", + "user_id": 53}], "http_etag": "\"87df200e8008483eeb66a7ae6bd6e5b92ba14ee6\"", + "start": 0, "total_size": 2}'} + headers: + content-length: ['487'] + 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/52 response: body: {string: !!python/unicode ''} headers: @@ -272,7 +317,7 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode DELETE - uri: http://localhost:9001/3.0/domains/example.com + uri: http://localhost:9001/3.0/users/53 response: body: {string: !!python/unicode ''} headers: diff --git a/src/postorius/tests/fixtures/vcr_cassettes/ListHeaderMatchesTest.test_show_existing.yaml b/src/postorius/tests/fixtures/vcr_cassettes/ListHeaderMatchesTest.test_show_existing.yaml index 7c99949..e9b7921 100644 --- a/src/postorius/tests/fixtures/vcr_cassettes/ListHeaderMatchesTest.test_show_existing.yaml +++ b/src/postorius/tests/fixtures/vcr_cassettes/ListHeaderMatchesTest.test_show_existing.yaml @@ -102,10 +102,10 @@ uri: http://localhost:9001/3.0/users/owner@example.com response: body: {string: !!python/unicode '{"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}'} + "\"9b874ad1cfcec0e350cc73b74e146dc62885865e\"", "is_server_owner": false, + "self_link": "http://localhost:9001/3.0/users/54", "user_id": 54}'} headers: - content-length: ['188'] + content-length: ['190'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -113,15 +113,15 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode GET - uri: http://localhost:9001/3.0/users/6/addresses + uri: http://localhost:9001/3.0/users/54/addresses response: body: {string: !!python/unicode '{"entries": [{"email": "owner@example.com", "http_etag": - "\"7efeccdd4edd0bed02cd2141365a115239f83be4\"", "original_email": "owner@example.com", + "\"41053de2d369d99b8bd9e04420d2cd09329f653d\"", "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/6"}], "http_etag": "\"a565f7d323e0a6ca5da35f6d965148fe4fe03fbb\"", + "user": "http://localhost:9001/3.0/users/54"}], "http_etag": "\"70c22c0a4cef0052a217651a637c28f0386b50c8\"", "start": 0, "total_size": 1}'} headers: - content-length: ['390'] + content-length: ['391'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -147,13 +147,13 @@ uri: http://localhost:9001/3.0/lists/list.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": "\"626ae3b3f35f453a431550641696ee185aadedc4\"", + "delivery_mode": "regular", "email": "owner@example.com", "http_etag": "\"511e53ce86449b0f896d7f5c3644c8cd57a23609\"", "list_id": "list.example.com", "member_id": 55, "moderation_action": "accept", "role": "owner", "self_link": "http://localhost:9001/3.0/members/55", "user": - "http://localhost:9001/3.0/users/6"}], "http_etag": "\"2dd277919ea20b22a41e6b84ea110360efb41fd6\"", + "http://localhost:9001/3.0/users/54"}], "http_etag": "\"d0dab7d4e277b26b3249c40063098841eb238a7a\"", "start": 0, "total_size": 1}'} headers: - content-length: ['486'] + content-length: ['487'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -165,13 +165,13 @@ 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": - "\"6b39ff26b36070746b0e2e9f0f908739218c80c4\"", "list_id": "list.example.com", + "\"fea2e1c43991de4bb78bfef07324466313db1b5b\"", "list_id": "list.example.com", "member_id": 56, "moderation_action": "accept", "role": "moderator", "self_link": - "http://localhost:9001/3.0/members/56", "user": "http://localhost:9001/3.0/users/7"}], - "http_etag": "\"28e96e21e091145c3b09eb82685e725bc632eedd\"", "start": 0, "total_size": + "http://localhost:9001/3.0/members/56", "user": "http://localhost:9001/3.0/users/55"}], + "http_etag": "\"ae94e304357175074788faae33048e1fbae00d89\"", "start": 0, "total_size": 1}'} headers: - content-length: ['498'] + content-length: ['499'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -209,8 +209,53 @@ body: null headers: accept-encoding: ['gzip, deflate'] + method: !!python/unicode GET + uri: http://localhost:9001/3.0/domains + response: + body: {string: !!python/unicode '{"entries": [{"base_url": "http://example.com", + "description": null, "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", + "mail_host": "example.com", "self_link": "http://localhost:9001/3.0/domains/example.com", + "url_host": "example.com"}], "http_etag": "\"c385b155f8da284bf78dbe075e20f58a30c893ab\"", + "start": 0, "total_size": 1}'} + headers: + content-length: ['338'] + 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/list@example.com + uri: http://localhost:9001/3.0/domains/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 + response: + body: {string: !!python/unicode '{"entries": [{"created_on": "2005-08-01T07:49:23", + "http_etag": "\"9b874ad1cfcec0e350cc73b74e146dc62885865e\"", "is_server_owner": + false, "self_link": "http://localhost:9001/3.0/users/54", "user_id": 54}, + {"created_on": "2005-08-01T07:49:23", "http_etag": "\"df64d4f4adfafc9332703c75e9d7e02ec7b26df1\"", + "is_server_owner": false, "self_link": "http://localhost:9001/3.0/users/55", + "user_id": 55}], "http_etag": "\"3d672a1552fc81e1778e2a68c9741c1730dff010\"", + "start": 0, "total_size": 2}'} + headers: + content-length: ['487'] + 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/54 response: body: {string: !!python/unicode ''} headers: @@ -221,7 +266,7 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode DELETE - uri: http://localhost:9001/3.0/domains/example.com + uri: http://localhost:9001/3.0/users/55 response: body: {string: !!python/unicode ''} headers: diff --git a/src/postorius/tests/fixtures/vcr_cassettes/ListIndexPageTest.test_list_index_contains_the_lists.yaml b/src/postorius/tests/fixtures/vcr_cassettes/ListIndexPageTest.test_list_index_contains_the_lists.yaml index 057e1ef..b9cf5ed 100644 --- a/src/postorius/tests/fixtures/vcr_cassettes/ListIndexPageTest.test_list_index_contains_the_lists.yaml +++ b/src/postorius/tests/fixtures/vcr_cassettes/ListIndexPageTest.test_list_index_contains_the_lists.yaml @@ -176,20 +176,15 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode GET - uri: http://localhost:9001/3.0/lists + uri: http://localhost:9001/3.0/domains response: - body: {string: !!python/unicode '{"entries": [{"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}, {"display_name": "Bar", "fqdn_listname": "bar@example.com", - "http_etag": "\"ca42a69a3bab5619e147cc6cbbfca16115976764\"", "list_id": "bar.example.com", - "list_name": "bar", "mail_host": "example.com", "member_count": 0, "self_link": - "http://localhost:9001/3.0/lists/bar.example.com", "volume": 1}], "http_etag": - "\"32ddcf601b73aeabdba5c18666c75d062c76eac8\"", "start": 0, "total_size": - 2}'} + body: {string: !!python/unicode '{"entries": [{"base_url": "http://example.com", + "description": null, "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", + "mail_host": "example.com", "self_link": "http://localhost:9001/3.0/domains/example.com", + "url_host": "example.com"}], "http_etag": "\"c385b155f8da284bf78dbe075e20f58a30c893ab\"", + "start": 0, "total_size": 1}'} headers: - content-length: ['695'] + content-length: ['338'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -197,32 +192,23 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode DELETE - uri: http://localhost:9001/3.0/lists/foo@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/bar@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/domains/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 + 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} version: 1 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 803cd8f..19bccff 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 @@ -89,10 +89,10 @@ uri: http://localhost:9001/3.0/users/moderator@example.com response: body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag": - "\"c7360c029a83c97672ca38dd8b008d48e05949a6\"", "is_server_owner": false, - "self_link": "http://localhost:9001/3.0/users/7", "user_id": 7}'} + "\"4c816726023bb1daf76d48e82b250689df6a4694\"", "is_server_owner": false, + "self_link": "http://localhost:9001/3.0/users/11", "user_id": 11}'} headers: - content-length: ['188'] + content-length: ['190'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -100,16 +100,16 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode GET - uri: http://localhost:9001/3.0/users/7/addresses + uri: http://localhost:9001/3.0/users/11/addresses response: body: {string: !!python/unicode '{"entries": [{"email": "moderator@example.com", - "http_etag": "\"dc9e6ab7f685df3bdee82a1b48abcc345c24c317\"", "original_email": + "http_etag": "\"d1e57418dc20a4afd98efb490632b094680ab958\"", "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/7"}], - "http_etag": "\"61e6b2b734fab9e85bac3022e2728ddca6d73b95\"", "start": 0, "total_size": + "http://localhost:9001/3.0/addresses/moderator@example.com", "user": "http://localhost:9001/3.0/users/11"}], + "http_etag": "\"dd4cc658c98ed34e5420d37e6ecb5293f5b3182c\"", "start": 0, "total_size": 1}'} headers: - content-length: ['402'] + content-length: ['403'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -135,13 +135,13 @@ 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": "\"a39602ccc7999f8d0e588f5deead3ae39a2c6a9a\"", + "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/6"}], "http_etag": "\"4abb1c1dc54f2e15366121f2f2c80172e18e412a\"", + "http://localhost:9001/3.0/users/10"}], "http_etag": "\"3b6b0d93a464b25e8e0a9bd7fb45aa122af53cb1\"", "start": 0, "total_size": 1}'} headers: - content-length: ['483'] + content-length: ['484'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -153,13 +153,29 @@ 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": - "\"ad9a2301083130d9e1fa967beaafb9e6858ee391\"", "list_id": "foo.example.com", + "\"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/7"}], - "http_etag": "\"6b40b5e14baafb5306f9fa023bd6b9325e2055de\"", "start": 0, "total_size": + "http://localhost:9001/3.0/members/10", "user": "http://localhost:9001/3.0/users/11"}], + "http_etag": "\"e33a41f0881bff0f02b2dd36b3a0705daeb029bd\"", "start": 0, "total_size": 1}'} headers: - content-length: ['497'] + content-length: ['498'] + 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/domains + response: + body: {string: !!python/unicode '{"entries": [{"base_url": "http://example.com", + "description": null, "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", + "mail_host": "example.com", "self_link": "http://localhost:9001/3.0/domains/example.com", + "url_host": "example.com"}], "http_etag": "\"c385b155f8da284bf78dbe075e20f58a30c893ab\"", + "start": 0, "total_size": 1}'} + headers: + content-length: ['338'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -167,7 +183,44 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode DELETE - uri: http://localhost:9001/3.0/lists/foo@example.com + uri: http://localhost:9001/3.0/domains/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 + 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}'} + headers: + content-length: ['1247'] + 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 response: body: {string: !!python/unicode ''} headers: @@ -178,7 +231,51 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode DELETE - uri: http://localhost:9001/3.0/domains/example.com + 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 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 f41f43d..96f1813 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 @@ -89,10 +89,10 @@ uri: http://localhost:9001/3.0/users/owner@example.com response: body: {string: !!python/unicode '{"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}'} + "\"87648caa0e3380982e197beebf79e468670de477\"", "is_server_owner": false, + "self_link": "http://localhost:9001/3.0/users/12", "user_id": 12}'} headers: - content-length: ['188'] + content-length: ['190'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -100,15 +100,15 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode GET - uri: http://localhost:9001/3.0/users/6/addresses + uri: http://localhost:9001/3.0/users/12/addresses response: body: {string: !!python/unicode '{"entries": [{"email": "owner@example.com", "http_etag": - "\"7efeccdd4edd0bed02cd2141365a115239f83be4\"", "original_email": "owner@example.com", + "\"12f4aef05d85e9e0f6ba3ad35464807315a0f403\"", "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/6"}], "http_etag": "\"a565f7d323e0a6ca5da35f6d965148fe4fe03fbb\"", + "user": "http://localhost:9001/3.0/users/12"}], "http_etag": "\"3fbd8078d58162d668205f05a4be33d1acdf73c2\"", "start": 0, "total_size": 1}'} headers: - content-length: ['390'] + content-length: ['391'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -134,13 +134,13 @@ 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": "\"1424392209998a4d640215866b8e07ab08180909\"", + "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/6"}], "http_etag": "\"9e92b48031746cb134b5e32e74cfd523d1aa1895\"", + "http://localhost:9001/3.0/users/12"}], "http_etag": "\"7f2da206e0882d20be653e1bb83082872b8ca26b\"", "start": 0, "total_size": 1}'} headers: - content-length: ['485'] + content-length: ['486'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -152,13 +152,13 @@ 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": - "\"a0bc7d150b189a7b7539bdf9c3f68ab1513653f4\"", "list_id": "foo.example.com", + "\"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/7"}], - "http_etag": "\"ad010d8da5344dc1d5eae5513db72a6c04b605f8\"", "start": 0, "total_size": + "http://localhost:9001/3.0/members/12", "user": "http://localhost:9001/3.0/users/13"}], + "http_etag": "\"02a841abd866594dc4eb43e554ae096772ddac35\"", "start": 0, "total_size": 1}'} headers: - content-length: ['497'] + content-length: ['498'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -206,8 +206,53 @@ body: null headers: accept-encoding: ['gzip, deflate'] + method: !!python/unicode GET + uri: http://localhost:9001/3.0/domains + response: + body: {string: !!python/unicode '{"entries": [{"base_url": "http://example.com", + "description": null, "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", + "mail_host": "example.com", "self_link": "http://localhost:9001/3.0/domains/example.com", + "url_host": "example.com"}], "http_etag": "\"c385b155f8da284bf78dbe075e20f58a30c893ab\"", + "start": 0, "total_size": 1}'} + headers: + content-length: ['338'] + content-type: [application/json; charset=utf-8] + status: {code: 200, message: OK} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] method: !!python/unicode DELETE - uri: http://localhost:9001/3.0/lists/foo@example.com + uri: http://localhost:9001/3.0/domains/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 + 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\"", + "start": 0, "total_size": 2}'} + headers: + content-length: ['487'] + 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 response: body: {string: !!python/unicode ''} headers: @@ -218,7 +263,7 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode DELETE - uri: http://localhost:9001/3.0/domains/example.com + uri: http://localhost:9001/3.0/users/13 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 c3452c0..6a8f43f 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 @@ -88,29 +88,11 @@ method: !!python/unicode GET uri: http://localhost:9001/3.0/users/su@example.com response: - body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag": - "\"bb1c2e6094a96b17e2d5dbf487291f7667f69f75\"", "is_server_owner": false, - "self_link": "http://localhost:9001/3.0/users/3", "user_id": 3}'} + body: {string: !!python/unicode 404 Not Found} headers: - content-length: ['188'] + content-length: ['13'] 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/3/addresses - response: - body: {string: !!python/unicode '{"entries": [{"email": "su@example.com", "http_etag": - "\"91c297417f4c33cf707148d031e79b6cb316f158\"", "original_email": "su@example.com", - "registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/su@example.com", - "user": "http://localhost:9001/3.0/users/3"}], "http_etag": "\"e9a7c409726b93f93aaf643fce49558cf27237e1\"", - "start": 0, "total_size": 1}'} - headers: - content-length: ['381'] - content-type: [application/json; charset=utf-8] - status: {code: 200, message: OK} + status: {code: 404, message: Not Found} - request: body: null headers: @@ -156,8 +138,53 @@ body: null headers: accept-encoding: ['gzip, deflate'] + method: !!python/unicode GET + uri: http://localhost:9001/3.0/domains + response: + body: {string: !!python/unicode '{"entries": [{"base_url": "http://example.com", + "description": null, "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", + "mail_host": "example.com", "self_link": "http://localhost:9001/3.0/domains/example.com", + "url_host": "example.com"}], "http_etag": "\"c385b155f8da284bf78dbe075e20f58a30c893ab\"", + "start": 0, "total_size": 1}'} + headers: + content-length: ['338'] + content-type: [application/json; charset=utf-8] + status: {code: 200, message: OK} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] method: !!python/unicode DELETE - uri: http://localhost:9001/3.0/lists/foo@example.com + uri: http://localhost:9001/3.0/domains/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 + 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\"", + "start": 0, "total_size": 2}'} + headers: + content-length: ['487'] + 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 response: body: {string: !!python/unicode ''} headers: @@ -168,7 +195,7 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode DELETE - uri: http://localhost:9001/3.0/domains/example.com + uri: http://localhost:9001/3.0/users/15 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 5e8465a..bbca8d7 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 @@ -116,13 +116,13 @@ 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": "\"78d36df2c05ca4affd317dfe82f2c67f1d665c85\"", + "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/6"}], "http_etag": "\"698a689649ad49307280951357ada14bb86d3074\"", + "http://localhost:9001/3.0/users/16"}], "http_etag": "\"f0cefc2c95e89d58556a6cd944c834b1c80d52dc\"", "start": 0, "total_size": 1}'} headers: - content-length: ['485'] + content-length: ['486'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -134,13 +134,29 @@ 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": - "\"9a8d0e9100dcc873ef3153b9fad8e739e5d43079\"", "list_id": "foo.example.com", + "\"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/7"}], - "http_etag": "\"ae1b9a8a43f21b1d78a031b169fc717c95ac4701\"", "start": 0, "total_size": + "http://localhost:9001/3.0/members/16", "user": "http://localhost:9001/3.0/users/17"}], + "http_etag": "\"254a3b743810bd9a16eb463b5f430b89653381bb\"", "start": 0, "total_size": 1}'} headers: - content-length: ['497'] + content-length: ['498'] + 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/domains + response: + body: {string: !!python/unicode '{"entries": [{"base_url": "http://example.com", + "description": null, "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", + "mail_host": "example.com", "self_link": "http://localhost:9001/3.0/domains/example.com", + "url_host": "example.com"}], "http_etag": "\"c385b155f8da284bf78dbe075e20f58a30c893ab\"", + "start": 0, "total_size": 1}'} + headers: + content-length: ['338'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -148,7 +164,36 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode DELETE - uri: http://localhost:9001/3.0/lists/foo@example.com + uri: http://localhost:9001/3.0/domains/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 + 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\"", + "start": 0, "total_size": 2}'} + headers: + content-length: ['487'] + 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 response: body: {string: !!python/unicode ''} headers: @@ -159,7 +204,7 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode DELETE - uri: http://localhost:9001/3.0/domains/example.com + uri: http://localhost:9001/3.0/users/17 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 8e880b2..e4eb536 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 @@ -85,8 +85,53 @@ body: null headers: accept-encoding: ['gzip, deflate'] + method: !!python/unicode GET + uri: http://localhost:9001/3.0/domains + response: + body: {string: !!python/unicode '{"entries": [{"base_url": "http://example.com", + "description": null, "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", + "mail_host": "example.com", "self_link": "http://localhost:9001/3.0/domains/example.com", + "url_host": "example.com"}], "http_etag": "\"c385b155f8da284bf78dbe075e20f58a30c893ab\"", + "start": 0, "total_size": 1}'} + headers: + content-length: ['338'] + content-type: [application/json; charset=utf-8] + status: {code: 200, message: OK} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] method: !!python/unicode DELETE - uri: http://localhost:9001/3.0/lists/foo@example.com + uri: http://localhost:9001/3.0/domains/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 + 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\"", + "start": 0, "total_size": 2}'} + headers: + content-length: ['487'] + 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 response: body: {string: !!python/unicode ''} headers: @@ -97,7 +142,7 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode DELETE - uri: http://localhost:9001/3.0/domains/example.com + uri: http://localhost:9001/3.0/users/19 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 5659798..34c3ba9 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 @@ -88,29 +88,11 @@ method: !!python/unicode GET uri: http://localhost:9001/3.0/users/su@example.com response: - body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag": - "\"bb1c2e6094a96b17e2d5dbf487291f7667f69f75\"", "is_server_owner": false, - "self_link": "http://localhost:9001/3.0/users/3", "user_id": 3}'} + body: {string: !!python/unicode 404 Not Found} headers: - content-length: ['188'] + content-length: ['13'] 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/3/addresses - response: - body: {string: !!python/unicode '{"entries": [{"email": "su@example.com", "http_etag": - "\"91c297417f4c33cf707148d031e79b6cb316f158\"", "original_email": "su@example.com", - "registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/su@example.com", - "user": "http://localhost:9001/3.0/users/3"}], "http_etag": "\"e9a7c409726b93f93aaf643fce49558cf27237e1\"", - "start": 0, "total_size": 1}'} - headers: - content-length: ['381'] - content-type: [application/json; charset=utf-8] - status: {code: 200, message: OK} + status: {code: 404, message: Not Found} - request: body: null headers: @@ -135,13 +117,12 @@ response: body: {string: !!python/unicode '{"entries": [{"address": "http://localhost:9001/3.0/addresses/member-1@example.com", "delivery_mode": "regular", "email": "member-1@example.com", "http_etag": - "\"38181acbc69bde4a9e69887f5784a02f9f7bc768\"", "list_id": "foo.example.com", - "member_id": 19, "moderation_action": "defer", "role": "member", "self_link": - "http://localhost:9001/3.0/members/19", "user": "http://localhost:9001/3.0/users/8"}], - "http_etag": "\"33f8b1c3d4fba458ae0ecc637b59943bfbedcf69\"", "start": 0, "total_size": - 2}'} + "\"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\"", + "start": 0, "total_size": 2}'} headers: - content-length: ['491'] + content-length: ['462'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -153,17 +134,16 @@ response: body: {string: !!python/unicode '{"entries": [{"address": "http://localhost:9001/3.0/addresses/member-1@example.com", "delivery_mode": "regular", "email": "member-1@example.com", "http_etag": - "\"38181acbc69bde4a9e69887f5784a02f9f7bc768\"", "list_id": "foo.example.com", - "member_id": 19, "moderation_action": "defer", "role": "member", "self_link": - "http://localhost:9001/3.0/members/19", "user": "http://localhost:9001/3.0/users/8"}, - {"address": "http://localhost:9001/3.0/addresses/member-2@example.com", "delivery_mode": - "regular", "email": "member-2@example.com", "http_etag": "\"d129b1b76d2f940cd248904b497bd5003e2978e9\"", - "list_id": "foo.example.com", "member_id": 20, "moderation_action": "defer", - "role": "member", "self_link": "http://localhost:9001/3.0/members/20", "user": - "http://localhost:9001/3.0/users/9"}], "http_etag": "\"4162679f42a6143498f6f93e48f5188282e1ad1a\"", + "\"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", + "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\"", "start": 0, "total_size": 2}'} headers: - content-length: ['879'] + content-length: ['821'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -175,11 +155,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": - "\"38181acbc69bde4a9e69887f5784a02f9f7bc768\"", "list_id": "foo.example.com", - "member_id": 19, "moderation_action": "defer", "role": "member", "self_link": - "http://localhost:9001/3.0/members/19", "user": "http://localhost:9001/3.0/users/8"}'} + "\"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"}'} headers: - content-length: ['386'] + content-length: ['357'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -191,11 +171,11 @@ 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": - "\"d129b1b76d2f940cd248904b497bd5003e2978e9\"", "list_id": "foo.example.com", - "member_id": 20, "moderation_action": "defer", "role": "member", "self_link": - "http://localhost:9001/3.0/members/20", "user": "http://localhost:9001/3.0/users/9"}'} + "\"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"}'} headers: - content-length: ['386'] + content-length: ['357'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -205,29 +185,11 @@ method: !!python/unicode GET uri: http://localhost:9001/3.0/users/su@example.com response: - body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag": - "\"bb1c2e6094a96b17e2d5dbf487291f7667f69f75\"", "is_server_owner": false, - "self_link": "http://localhost:9001/3.0/users/3", "user_id": 3}'} + body: {string: !!python/unicode 404 Not Found} headers: - content-length: ['188'] + content-length: ['13'] 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/3/addresses - response: - body: {string: !!python/unicode '{"entries": [{"email": "su@example.com", "http_etag": - "\"91c297417f4c33cf707148d031e79b6cb316f158\"", "original_email": "su@example.com", - "registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/su@example.com", - "user": "http://localhost:9001/3.0/users/3"}], "http_etag": "\"e9a7c409726b93f93aaf643fce49558cf27237e1\"", - "start": 0, "total_size": 1}'} - headers: - content-length: ['381'] - content-type: [application/json; charset=utf-8] - status: {code: 200, message: OK} + status: {code: 404, message: Not Found} - request: body: null headers: @@ -252,13 +214,12 @@ response: body: {string: !!python/unicode '{"entries": [{"address": "http://localhost:9001/3.0/addresses/member-1@example.com", "delivery_mode": "regular", "email": "member-1@example.com", "http_etag": - "\"38181acbc69bde4a9e69887f5784a02f9f7bc768\"", "list_id": "foo.example.com", - "member_id": 19, "moderation_action": "defer", "role": "member", "self_link": - "http://localhost:9001/3.0/members/19", "user": "http://localhost:9001/3.0/users/8"}], - "http_etag": "\"d178311a2d5a4eda5a1db558e9e57130b11a5594\"", "start": 0, "total_size": - 1}'} + "\"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\"", + "start": 0, "total_size": 1}'} headers: - content-length: ['491'] + content-length: ['462'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -270,13 +231,12 @@ response: body: {string: !!python/unicode '{"entries": [{"address": "http://localhost:9001/3.0/addresses/member-1@example.com", "delivery_mode": "regular", "email": "member-1@example.com", "http_etag": - "\"38181acbc69bde4a9e69887f5784a02f9f7bc768\"", "list_id": "foo.example.com", - "member_id": 19, "moderation_action": "defer", "role": "member", "self_link": - "http://localhost:9001/3.0/members/19", "user": "http://localhost:9001/3.0/users/8"}], - "http_etag": "\"d178311a2d5a4eda5a1db558e9e57130b11a5594\"", "start": 0, "total_size": - 1}'} + "\"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\"", + "start": 0, "total_size": 1}'} headers: - content-length: ['491'] + content-length: ['462'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: 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 5921554..ac82de4 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 @@ -88,29 +88,11 @@ method: !!python/unicode GET uri: http://localhost:9001/3.0/users/su@example.com response: - body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag": - "\"bb1c2e6094a96b17e2d5dbf487291f7667f69f75\"", "is_server_owner": false, - "self_link": "http://localhost:9001/3.0/users/3", "user_id": 3}'} + body: {string: !!python/unicode 404 Not Found} headers: - content-length: ['188'] + content-length: ['13'] 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/3/addresses - response: - body: {string: !!python/unicode '{"entries": [{"email": "su@example.com", "http_etag": - "\"91c297417f4c33cf707148d031e79b6cb316f158\"", "original_email": "su@example.com", - "registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/su@example.com", - "user": "http://localhost:9001/3.0/users/3"}], "http_etag": "\"e9a7c409726b93f93aaf643fce49558cf27237e1\"", - "start": 0, "total_size": 1}'} - headers: - content-length: ['381'] - content-type: [application/json; charset=utf-8] - status: {code: 200, message: OK} + status: {code: 404, message: Not Found} - request: body: null headers: @@ -135,13 +117,12 @@ response: body: {string: !!python/unicode '{"entries": [{"address": "http://localhost:9001/3.0/addresses/member-1@example.com", "delivery_mode": "regular", "email": "member-1@example.com", "http_etag": - "\"d70814e9dcf6ea961550fe063955a8baa457a529\"", "list_id": "foo.example.com", - "member_id": 21, "moderation_action": "defer", "role": "member", "self_link": - "http://localhost:9001/3.0/members/21", "user": "http://localhost:9001/3.0/users/8"}], - "http_etag": "\"9c84b6003c978c4e1f99c0616098764caa59fe72\"", "start": 0, "total_size": - 2}'} + "\"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\"", + "start": 0, "total_size": 2}'} headers: - content-length: ['491'] + content-length: ['462'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -153,17 +134,16 @@ response: body: {string: !!python/unicode '{"entries": [{"address": "http://localhost:9001/3.0/addresses/member-1@example.com", "delivery_mode": "regular", "email": "member-1@example.com", "http_etag": - "\"d70814e9dcf6ea961550fe063955a8baa457a529\"", "list_id": "foo.example.com", - "member_id": 21, "moderation_action": "defer", "role": "member", "self_link": - "http://localhost:9001/3.0/members/21", "user": "http://localhost:9001/3.0/users/8"}, - {"address": "http://localhost:9001/3.0/addresses/member-2@example.com", "delivery_mode": - "regular", "email": "member-2@example.com", "http_etag": "\"b97909b8a281dafa8dcfac917a5fb31da29d6d83\"", - "list_id": "foo.example.com", "member_id": 22, "moderation_action": "defer", - "role": "member", "self_link": "http://localhost:9001/3.0/members/22", "user": - "http://localhost:9001/3.0/users/9"}], "http_etag": "\"8303203d0714f3fcf4db76ce165a0e1acfac0e09\"", + "\"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", + "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\"", "start": 0, "total_size": 2}'} headers: - content-length: ['879'] + content-length: ['821'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -175,11 +155,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": - "\"d70814e9dcf6ea961550fe063955a8baa457a529\"", "list_id": "foo.example.com", - "member_id": 21, "moderation_action": "defer", "role": "member", "self_link": - "http://localhost:9001/3.0/members/21", "user": "http://localhost:9001/3.0/users/8"}'} + "\"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"}'} headers: - content-length: ['386'] + content-length: ['357'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -191,11 +171,11 @@ 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": - "\"b97909b8a281dafa8dcfac917a5fb31da29d6d83\"", "list_id": "foo.example.com", - "member_id": 22, "moderation_action": "defer", "role": "member", "self_link": - "http://localhost:9001/3.0/members/22", "user": "http://localhost:9001/3.0/users/9"}'} + "\"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"}'} headers: - content-length: ['386'] + content-length: ['357'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: diff --git a/src/postorius/tests/fixtures/vcr_cassettes/ListSettingsTest.test_archivers.yaml b/src/postorius/tests/fixtures/vcr_cassettes/ListSettingsTest.test_archivers.yaml index 0fa65e8..01f3a91 100644 --- a/src/postorius/tests/fixtures/vcr_cassettes/ListSettingsTest.test_archivers.yaml +++ b/src/postorius/tests/fixtures/vcr_cassettes/ListSettingsTest.test_archivers.yaml @@ -101,29 +101,11 @@ method: !!python/unicode GET uri: http://localhost:9001/3.0/users/su@example.com response: - body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag": - "\"bb1c2e6094a96b17e2d5dbf487291f7667f69f75\"", "is_server_owner": false, - "self_link": "http://localhost:9001/3.0/users/3", "user_id": 3}'} + body: {string: !!python/unicode 404 Not Found} headers: - content-length: ['188'] + content-length: ['13'] 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/3/addresses - response: - body: {string: !!python/unicode '{"entries": [{"email": "su@example.com", "http_etag": - "\"91c297417f4c33cf707148d031e79b6cb316f158\"", "original_email": "su@example.com", - "registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/su@example.com", - "user": "http://localhost:9001/3.0/users/3"}], "http_etag": "\"e9a7c409726b93f93aaf643fce49558cf27237e1\"", - "start": 0, "total_size": 1}'} - headers: - content-length: ['381'] - content-type: [application/json; charset=utf-8] - status: {code: 200, message: OK} + status: {code: 404, message: Not Found} - request: body: null headers: @@ -244,29 +226,11 @@ method: !!python/unicode GET uri: http://localhost:9001/3.0/users/su@example.com response: - body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag": - "\"bb1c2e6094a96b17e2d5dbf487291f7667f69f75\"", "is_server_owner": false, - "self_link": "http://localhost:9001/3.0/users/3", "user_id": 3}'} + body: {string: !!python/unicode 404 Not Found} headers: - content-length: ['188'] + content-length: ['13'] 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/3/addresses - response: - body: {string: !!python/unicode '{"entries": [{"email": "su@example.com", "http_etag": - "\"91c297417f4c33cf707148d031e79b6cb316f158\"", "original_email": "su@example.com", - "registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/su@example.com", - "user": "http://localhost:9001/3.0/users/3"}], "http_etag": "\"e9a7c409726b93f93aaf643fce49558cf27237e1\"", - "start": 0, "total_size": 1}'} - headers: - content-length: ['381'] - content-type: [application/json; charset=utf-8] - status: {code: 200, message: OK} + status: {code: 404, message: Not Found} - request: body: null headers: @@ -384,29 +348,11 @@ method: !!python/unicode GET uri: http://localhost:9001/3.0/users/su@example.com response: - body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag": - "\"bb1c2e6094a96b17e2d5dbf487291f7667f69f75\"", "is_server_owner": false, - "self_link": "http://localhost:9001/3.0/users/3", "user_id": 3}'} + body: {string: !!python/unicode 404 Not Found} headers: - content-length: ['188'] + content-length: ['13'] 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/3/addresses - response: - body: {string: !!python/unicode '{"entries": [{"email": "su@example.com", "http_etag": - "\"91c297417f4c33cf707148d031e79b6cb316f158\"", "original_email": "su@example.com", - "registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/su@example.com", - "user": "http://localhost:9001/3.0/users/3"}], "http_etag": "\"e9a7c409726b93f93aaf643fce49558cf27237e1\"", - "start": 0, "total_size": 1}'} - headers: - content-length: ['381'] - content-type: [application/json; charset=utf-8] - status: {code: 200, message: OK} + status: {code: 404, message: Not Found} - request: body: null headers: @@ -552,8 +498,53 @@ body: null headers: accept-encoding: ['gzip, deflate'] + method: !!python/unicode GET + uri: http://localhost:9001/3.0/domains + response: + body: {string: !!python/unicode '{"entries": [{"base_url": "http://example.com", + "description": null, "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", + "mail_host": "example.com", "self_link": "http://localhost:9001/3.0/domains/example.com", + "url_host": "example.com"}], "http_etag": "\"c385b155f8da284bf78dbe075e20f58a30c893ab\"", + "start": 0, "total_size": 1}'} + headers: + content-length: ['338'] + content-type: [application/json; charset=utf-8] + status: {code: 200, message: OK} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] method: !!python/unicode DELETE - uri: http://localhost:9001/3.0/lists/foo@example.com + uri: http://localhost:9001/3.0/domains/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 + response: + body: {string: !!python/unicode '{"entries": [{"created_on": "2005-08-01T07:49:23", + "http_etag": "\"6876e6a47eb6204326d7501101c555715f56ecb2\"", "is_server_owner": + false, "self_link": "http://localhost:9001/3.0/users/68", "user_id": 68}, + {"created_on": "2005-08-01T07:49:23", "http_etag": "\"9a4eb09d5f278d468d727006ee5ad139e637be67\"", + "is_server_owner": false, "self_link": "http://localhost:9001/3.0/users/69", + "user_id": 69}], "http_etag": "\"d12c3d798fc41a65ad876b8d83d07d39389126d5\"", + "start": 0, "total_size": 2}'} + headers: + content-length: ['487'] + 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/68 response: body: {string: !!python/unicode ''} headers: @@ -564,7 +555,7 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode DELETE - uri: http://localhost:9001/3.0/domains/example.com + uri: http://localhost:9001/3.0/users/69 response: body: {string: !!python/unicode ''} headers: diff --git a/src/postorius/tests/fixtures/vcr_cassettes/ListSettingsTest.test_archiving_policy.yaml b/src/postorius/tests/fixtures/vcr_cassettes/ListSettingsTest.test_archiving_policy.yaml index 1c08235..4d145a2 100644 --- a/src/postorius/tests/fixtures/vcr_cassettes/ListSettingsTest.test_archiving_policy.yaml +++ b/src/postorius/tests/fixtures/vcr_cassettes/ListSettingsTest.test_archiving_policy.yaml @@ -121,29 +121,11 @@ method: !!python/unicode GET uri: http://localhost:9001/3.0/users/su@example.com response: - body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag": - "\"bb1c2e6094a96b17e2d5dbf487291f7667f69f75\"", "is_server_owner": false, - "self_link": "http://localhost:9001/3.0/users/3", "user_id": 3}'} + body: {string: !!python/unicode 404 Not Found} headers: - content-length: ['188'] + content-length: ['13'] 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/3/addresses - response: - body: {string: !!python/unicode '{"entries": [{"email": "su@example.com", "http_etag": - "\"91c297417f4c33cf707148d031e79b6cb316f158\"", "original_email": "su@example.com", - "registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/su@example.com", - "user": "http://localhost:9001/3.0/users/3"}], "http_etag": "\"e9a7c409726b93f93aaf643fce49558cf27237e1\"", - "start": 0, "total_size": 1}'} - headers: - content-length: ['381'] - content-type: [application/json; charset=utf-8] - status: {code: 200, message: OK} + status: {code: 404, message: Not Found} - request: body: null headers: @@ -264,29 +246,11 @@ method: !!python/unicode GET uri: http://localhost:9001/3.0/users/su@example.com response: - body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag": - "\"bb1c2e6094a96b17e2d5dbf487291f7667f69f75\"", "is_server_owner": false, - "self_link": "http://localhost:9001/3.0/users/3", "user_id": 3}'} + body: {string: !!python/unicode 404 Not Found} headers: - content-length: ['188'] + content-length: ['13'] 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/3/addresses - response: - body: {string: !!python/unicode '{"entries": [{"email": "su@example.com", "http_etag": - "\"91c297417f4c33cf707148d031e79b6cb316f158\"", "original_email": "su@example.com", - "registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/su@example.com", - "user": "http://localhost:9001/3.0/users/3"}], "http_etag": "\"e9a7c409726b93f93aaf643fce49558cf27237e1\"", - "start": 0, "total_size": 1}'} - headers: - content-length: ['381'] - content-type: [application/json; charset=utf-8] - status: {code: 200, message: OK} + status: {code: 404, message: Not Found} - request: body: null headers: @@ -404,11 +368,24 @@ method: !!python/unicode GET uri: http://localhost:9001/3.0/users/su@example.com response: - body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag": - "\"bb1c2e6094a96b17e2d5dbf487291f7667f69f75\"", "is_server_owner": false, - "self_link": "http://localhost:9001/3.0/users/3", "user_id": 3}'} + body: {string: !!python/unicode 404 Not Found} headers: - content-length: ['188'] + 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: @@ -416,176 +393,161 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode GET - uri: http://localhost:9001/3.0/users/3/addresses + uri: http://localhost:9001/3.0/lists/foo@example.com/config response: - body: {string: !!python/unicode '{"entries": [{"email": "su@example.com", "http_etag": - "\"91c297417f4c33cf707148d031e79b6cb316f158\"", "original_email": "su@example.com", - "registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/su@example.com", - "user": "http://localhost:9001/3.0/users/3"}], "http_etag": "\"e9a7c409726b93f93aaf643fce49558cf27237e1\"", + body: {string: !!python/unicode '{"acceptable_aliases": [], "admin_immed_notify": + true, "admin_notify_mchanges": false, "administrivia": true, "advertised": + true, "allow_list_posts": true, "anonymous_list": false, "archive_policy": + "private", "autorespond_owner": "none", "autorespond_postings": "none", "autorespond_requests": + "none", "autoresponse_grace_period": "90d", "autoresponse_owner_text": "", + "autoresponse_postings_text": "", "autoresponse_request_text": "", "bounces_address": + "foo-bounces@example.com", "collapse_alternatives": true, "convert_html_to_plaintext": + false, "created_at": "2005-08-01T07:49:23", "default_member_action": "defer", + "default_nonmember_action": "hold", "description": "", "digest_last_sent_at": + null, "digest_send_periodic": true, "digest_size_threshold": 30.0, "digest_volume_frequency": + "monthly", "digests_enabled": true, "display_name": "Foo", "filter_content": + false, "first_strip_reply_to": false, "fqdn_listname": "foo@example.com", + "goodbye_message_uri": "", "http_etag": "\"d4e967807b81e9f8f8e9b284bd589729b0406ee9\"", + "include_rfc2369_headers": true, "join_address": "foo-join@example.com", "last_post_at": + null, "leave_address": "foo-leave@example.com", "list_name": "foo", "mail_host": + "example.com", "next_digest_number": 1, "no_reply_address": "noreply@example.com", + "owner_address": "foo-owner@example.com", "post_id": 1, "posting_address": + "foo@example.com", "posting_pipeline": "default-posting-pipeline", "reply_goes_to_list": + "no_munging", "reply_to_address": "", "request_address": "foo-request@example.com", + "scheme": "http", "send_welcome_message": true, "subject_prefix": "[Foo] ", + "subscription_policy": "confirm", "volume": 1, "web_host": "example.com", + "welcome_message_uri": "mailman:///welcome.txt"}'} + headers: + content-length: ['1731'] + 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/archivers + response: + body: {string: !!python/unicode '{"http_etag": "\"e8abfb237f8ebda71c95d59b907288473359bb5a\"", + "mail-archive": false, "mhonarc": false, "prototype": false}'} + headers: + content-length: ['122'] + 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/archivers + response: + body: {string: !!python/unicode '{"http_etag": "\"e8abfb237f8ebda71c95d59b907288473359bb5a\"", + "mail-archive": false, "mhonarc": false, "prototype": false}'} + headers: + content-length: ['122'] + 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/archivers + response: + body: {string: !!python/unicode '{"http_etag": "\"e8abfb237f8ebda71c95d59b907288473359bb5a\"", + "mail-archive": false, "mhonarc": false, "prototype": false}'} + headers: + content-length: ['122'] + 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/archivers + response: + body: {string: !!python/unicode '{"http_etag": "\"e8abfb237f8ebda71c95d59b907288473359bb5a\"", + "mail-archive": false, "mhonarc": false, "prototype": false}'} + headers: + content-length: ['122'] + 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/archivers + response: + body: {string: !!python/unicode '{"http_etag": "\"e8abfb237f8ebda71c95d59b907288473359bb5a\"", + "mail-archive": false, "mhonarc": false, "prototype": false}'} + headers: + content-length: ['122'] + content-type: [application/json; charset=utf-8] + status: {code: 200, message: OK} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + method: !!python/unicode GET + uri: http://localhost:9001/3.0/lists/foo.example.com + response: + body: {string: !!python/unicode '{"display_name": "Foo", "fqdn_listname": "foo@example.com", + "http_etag": "\"698a819bbb6b902096a8c5543cc7fac2328960d5\"", "list_id": "foo.example.com", + "list_name": "foo", "mail_host": "example.com", "member_count": 0, "self_link": + "http://localhost:9001/3.0/lists/foo.example.com", "volume": 1}'} + headers: + content-length: ['294'] + content-type: [application/json; charset=utf-8] + 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/config + response: + body: {string: !!python/unicode '{"acceptable_aliases": [], "admin_immed_notify": + true, "admin_notify_mchanges": false, "administrivia": true, "advertised": + true, "allow_list_posts": true, "anonymous_list": false, "archive_policy": + "private", "autorespond_owner": "none", "autorespond_postings": "none", "autorespond_requests": + "none", "autoresponse_grace_period": "90d", "autoresponse_owner_text": "", + "autoresponse_postings_text": "", "autoresponse_request_text": "", "bounces_address": + "foo-bounces@example.com", "collapse_alternatives": true, "convert_html_to_plaintext": + false, "created_at": "2005-08-01T07:49:23", "default_member_action": "defer", + "default_nonmember_action": "hold", "description": "", "digest_last_sent_at": + null, "digest_send_periodic": true, "digest_size_threshold": 30.0, "digest_volume_frequency": + "monthly", "digests_enabled": true, "display_name": "Foo", "filter_content": + false, "first_strip_reply_to": false, "fqdn_listname": "foo@example.com", + "goodbye_message_uri": "", "http_etag": "\"d4e967807b81e9f8f8e9b284bd589729b0406ee9\"", + "include_rfc2369_headers": true, "join_address": "foo-join@example.com", "last_post_at": + null, "leave_address": "foo-leave@example.com", "list_name": "foo", "mail_host": + "example.com", "next_digest_number": 1, "no_reply_address": "noreply@example.com", + "owner_address": "foo-owner@example.com", "post_id": 1, "posting_address": + "foo@example.com", "posting_pipeline": "default-posting-pipeline", "reply_goes_to_list": + "no_munging", "reply_to_address": "", "request_address": "foo-request@example.com", + "scheme": "http", "send_welcome_message": true, "subject_prefix": "[Foo] ", + "subscription_policy": "confirm", "volume": 1, "web_host": "example.com", + "welcome_message_uri": "mailman:///welcome.txt"}'} + headers: + content-length: ['1731'] + 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/domains + response: + body: {string: !!python/unicode '{"entries": [{"base_url": "http://example.com", + "description": null, "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", + "mail_host": "example.com", "self_link": "http://localhost:9001/3.0/domains/example.com", + "url_host": "example.com"}], "http_etag": "\"c385b155f8da284bf78dbe075e20f58a30c893ab\"", "start": 0, "total_size": 1}'} headers: - content-length: ['381'] - content-type: [application/json; charset=utf-8] - status: {code: 200, message: OK} -- request: - body: null - headers: - 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/lists/foo@example.com/config - response: - body: {string: !!python/unicode '{"acceptable_aliases": [], "admin_immed_notify": - true, "admin_notify_mchanges": false, "administrivia": true, "advertised": - true, "allow_list_posts": true, "anonymous_list": false, "archive_policy": - "private", "autorespond_owner": "none", "autorespond_postings": "none", "autorespond_requests": - "none", "autoresponse_grace_period": "90d", "autoresponse_owner_text": "", - "autoresponse_postings_text": "", "autoresponse_request_text": "", "bounces_address": - "foo-bounces@example.com", "collapse_alternatives": true, "convert_html_to_plaintext": - false, "created_at": "2005-08-01T07:49:23", "default_member_action": "defer", - "default_nonmember_action": "hold", "description": "", "digest_last_sent_at": - null, "digest_send_periodic": true, "digest_size_threshold": 30.0, "digest_volume_frequency": - "monthly", "digests_enabled": true, "display_name": "Foo", "filter_content": - false, "first_strip_reply_to": false, "fqdn_listname": "foo@example.com", - "goodbye_message_uri": "", "http_etag": "\"d4e967807b81e9f8f8e9b284bd589729b0406ee9\"", - "include_rfc2369_headers": true, "join_address": "foo-join@example.com", "last_post_at": - null, "leave_address": "foo-leave@example.com", "list_name": "foo", "mail_host": - "example.com", "next_digest_number": 1, "no_reply_address": "noreply@example.com", - "owner_address": "foo-owner@example.com", "post_id": 1, "posting_address": - "foo@example.com", "posting_pipeline": "default-posting-pipeline", "reply_goes_to_list": - "no_munging", "reply_to_address": "", "request_address": "foo-request@example.com", - "scheme": "http", "send_welcome_message": true, "subject_prefix": "[Foo] ", - "subscription_policy": "confirm", "volume": 1, "web_host": "example.com", - "welcome_message_uri": "mailman:///welcome.txt"}'} - headers: - content-length: ['1731'] - 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/archivers - response: - body: {string: !!python/unicode '{"http_etag": "\"e8abfb237f8ebda71c95d59b907288473359bb5a\"", - "mail-archive": false, "mhonarc": false, "prototype": false}'} - headers: - content-length: ['122'] - 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/archivers - response: - body: {string: !!python/unicode '{"http_etag": "\"e8abfb237f8ebda71c95d59b907288473359bb5a\"", - "mail-archive": false, "mhonarc": false, "prototype": false}'} - headers: - content-length: ['122'] - 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/archivers - response: - body: {string: !!python/unicode '{"http_etag": "\"e8abfb237f8ebda71c95d59b907288473359bb5a\"", - "mail-archive": false, "mhonarc": false, "prototype": false}'} - headers: - content-length: ['122'] - 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/archivers - response: - body: {string: !!python/unicode '{"http_etag": "\"e8abfb237f8ebda71c95d59b907288473359bb5a\"", - "mail-archive": false, "mhonarc": false, "prototype": false}'} - headers: - content-length: ['122'] - 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/archivers - response: - body: {string: !!python/unicode '{"http_etag": "\"e8abfb237f8ebda71c95d59b907288473359bb5a\"", - "mail-archive": false, "mhonarc": false, "prototype": false}'} - headers: - content-length: ['122'] - content-type: [application/json; charset=utf-8] - status: {code: 200, message: OK} -- request: - body: null - headers: - accept-encoding: ['gzip, deflate'] - method: !!python/unicode GET - uri: http://localhost:9001/3.0/lists/foo.example.com - response: - body: {string: !!python/unicode '{"display_name": "Foo", "fqdn_listname": "foo@example.com", - "http_etag": "\"698a819bbb6b902096a8c5543cc7fac2328960d5\"", "list_id": "foo.example.com", - "list_name": "foo", "mail_host": "example.com", "member_count": 0, "self_link": - "http://localhost:9001/3.0/lists/foo.example.com", "volume": 1}'} - headers: - content-length: ['294'] - content-type: [application/json; charset=utf-8] - 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/config - response: - body: {string: !!python/unicode '{"acceptable_aliases": [], "admin_immed_notify": - true, "admin_notify_mchanges": false, "administrivia": true, "advertised": - true, "allow_list_posts": true, "anonymous_list": false, "archive_policy": - "private", "autorespond_owner": "none", "autorespond_postings": "none", "autorespond_requests": - "none", "autoresponse_grace_period": "90d", "autoresponse_owner_text": "", - "autoresponse_postings_text": "", "autoresponse_request_text": "", "bounces_address": - "foo-bounces@example.com", "collapse_alternatives": true, "convert_html_to_plaintext": - false, "created_at": "2005-08-01T07:49:23", "default_member_action": "defer", - "default_nonmember_action": "hold", "description": "", "digest_last_sent_at": - null, "digest_send_periodic": true, "digest_size_threshold": 30.0, "digest_volume_frequency": - "monthly", "digests_enabled": true, "display_name": "Foo", "filter_content": - false, "first_strip_reply_to": false, "fqdn_listname": "foo@example.com", - "goodbye_message_uri": "", "http_etag": "\"d4e967807b81e9f8f8e9b284bd589729b0406ee9\"", - "include_rfc2369_headers": true, "join_address": "foo-join@example.com", "last_post_at": - null, "leave_address": "foo-leave@example.com", "list_name": "foo", "mail_host": - "example.com", "next_digest_number": 1, "no_reply_address": "noreply@example.com", - "owner_address": "foo-owner@example.com", "post_id": 1, "posting_address": - "foo@example.com", "posting_pipeline": "default-posting-pipeline", "reply_goes_to_list": - "no_munging", "reply_to_address": "", "request_address": "foo-request@example.com", - "scheme": "http", "send_welcome_message": true, "subject_prefix": "[Foo] ", - "subscription_policy": "confirm", "volume": 1, "web_host": "example.com", - "welcome_message_uri": "mailman:///welcome.txt"}'} - headers: - content-length: ['1731'] + content-length: ['338'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -593,7 +555,36 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode DELETE - uri: http://localhost:9001/3.0/lists/foo@example.com + uri: http://localhost:9001/3.0/domains/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 + response: + body: {string: !!python/unicode '{"entries": [{"created_on": "2005-08-01T07:49:23", + "http_etag": "\"249816557a9c4603b3a04540d95e78b327b715c3\"", "is_server_owner": + false, "self_link": "http://localhost:9001/3.0/users/70", "user_id": 70}, + {"created_on": "2005-08-01T07:49:23", "http_etag": "\"aaf21b548c16ce156ecd1316ead130ff9710729a\"", + "is_server_owner": false, "self_link": "http://localhost:9001/3.0/users/71", + "user_id": 71}], "http_etag": "\"ca605a9cd2bb053cf7fe4ef5ff62a9e3414f79d0\"", + "start": 0, "total_size": 2}'} + headers: + content-length: ['487'] + 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/70 response: body: {string: !!python/unicode ''} headers: @@ -604,7 +595,7 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode DELETE - uri: http://localhost:9001/3.0/domains/example.com + uri: http://localhost:9001/3.0/users/71 response: body: {string: !!python/unicode ''} headers: diff --git a/src/postorius/tests/fixtures/vcr_cassettes/ListSettingsTest.test_not_accessible_for_moderator.yaml b/src/postorius/tests/fixtures/vcr_cassettes/ListSettingsTest.test_not_accessible_for_moderator.yaml index 4474151..858e024 100644 --- a/src/postorius/tests/fixtures/vcr_cassettes/ListSettingsTest.test_not_accessible_for_moderator.yaml +++ b/src/postorius/tests/fixtures/vcr_cassettes/ListSettingsTest.test_not_accessible_for_moderator.yaml @@ -89,10 +89,10 @@ uri: http://localhost:9001/3.0/users/moderator@example.com response: body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag": - "\"c7360c029a83c97672ca38dd8b008d48e05949a6\"", "is_server_owner": false, - "self_link": "http://localhost:9001/3.0/users/7", "user_id": 7}'} + "\"473b2615aa0b3a19fe77bc4c88fa9c56294b797b\"", "is_server_owner": false, + "self_link": "http://localhost:9001/3.0/users/73", "user_id": 73}'} headers: - content-length: ['188'] + content-length: ['190'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -100,16 +100,16 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode GET - uri: http://localhost:9001/3.0/users/7/addresses + uri: http://localhost:9001/3.0/users/73/addresses response: body: {string: !!python/unicode '{"entries": [{"email": "moderator@example.com", - "http_etag": "\"dc9e6ab7f685df3bdee82a1b48abcc345c24c317\"", "original_email": + "http_etag": "\"a3f8f5ed00f8ec50954bb71a727d9f21f2bde8c2\"", "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/7"}], - "http_etag": "\"61e6b2b734fab9e85bac3022e2728ddca6d73b95\"", "start": 0, "total_size": + "http://localhost:9001/3.0/addresses/moderator@example.com", "user": "http://localhost:9001/3.0/users/73"}], + "http_etag": "\"f524c811041c48ce45b2dd8fb86e39e412b879dc\"", "start": 0, "total_size": 1}'} headers: - content-length: ['402'] + content-length: ['403'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -135,13 +135,13 @@ 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": "\"478c5bd47f1c5bd648eecef1b47457fcae9b502c\"", + "delivery_mode": "regular", "email": "owner@example.com", "http_etag": "\"961c6a7eab998b92188a100be2aeea743eeae1bb\"", "list_id": "foo.example.com", "member_id": 73, "moderation_action": "accept", "role": "owner", "self_link": "http://localhost:9001/3.0/members/73", "user": - "http://localhost:9001/3.0/users/6"}], "http_etag": "\"e6babaa9d2120948c32eac37be8ecc5fa97ec778\"", + "http://localhost:9001/3.0/users/72"}], "http_etag": "\"55b55c82dc05af7c9192547fa1e1bafc02272d0d\"", "start": 0, "total_size": 1}'} headers: - content-length: ['485'] + content-length: ['486'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -153,13 +153,13 @@ 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": - "\"c71e2c46ed5770511b6fc62d56c05ed2f93dc6d2\"", "list_id": "foo.example.com", + "\"976a1391a5564cad880cade285eb2843b20d2c7b\"", "list_id": "foo.example.com", "member_id": 74, "moderation_action": "accept", "role": "moderator", "self_link": - "http://localhost:9001/3.0/members/74", "user": "http://localhost:9001/3.0/users/7"}], - "http_etag": "\"f36dc034fd855c48f223b50c69ea572e89582392\"", "start": 0, "total_size": + "http://localhost:9001/3.0/members/74", "user": "http://localhost:9001/3.0/users/73"}], + "http_etag": "\"e36a8ff989ec5990ba417c4efb42d4e4b350e480\"", "start": 0, "total_size": 1}'} headers: - content-length: ['497'] + content-length: ['498'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -170,10 +170,10 @@ uri: http://localhost:9001/3.0/users/moderator@example.com response: body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag": - "\"c7360c029a83c97672ca38dd8b008d48e05949a6\"", "is_server_owner": false, - "self_link": "http://localhost:9001/3.0/users/7", "user_id": 7}'} + "\"473b2615aa0b3a19fe77bc4c88fa9c56294b797b\"", "is_server_owner": false, + "self_link": "http://localhost:9001/3.0/users/73", "user_id": 73}'} headers: - content-length: ['188'] + content-length: ['190'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -181,16 +181,16 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode GET - uri: http://localhost:9001/3.0/users/7/addresses + uri: http://localhost:9001/3.0/users/73/addresses response: body: {string: !!python/unicode '{"entries": [{"email": "moderator@example.com", - "http_etag": "\"dc9e6ab7f685df3bdee82a1b48abcc345c24c317\"", "original_email": + "http_etag": "\"a3f8f5ed00f8ec50954bb71a727d9f21f2bde8c2\"", "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/7"}], - "http_etag": "\"61e6b2b734fab9e85bac3022e2728ddca6d73b95\"", "start": 0, "total_size": + "http://localhost:9001/3.0/addresses/moderator@example.com", "user": "http://localhost:9001/3.0/users/73"}], + "http_etag": "\"f524c811041c48ce45b2dd8fb86e39e412b879dc\"", "start": 0, "total_size": 1}'} headers: - content-length: ['402'] + content-length: ['403'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -216,13 +216,13 @@ 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": "\"478c5bd47f1c5bd648eecef1b47457fcae9b502c\"", + "delivery_mode": "regular", "email": "owner@example.com", "http_etag": "\"961c6a7eab998b92188a100be2aeea743eeae1bb\"", "list_id": "foo.example.com", "member_id": 73, "moderation_action": "accept", "role": "owner", "self_link": "http://localhost:9001/3.0/members/73", "user": - "http://localhost:9001/3.0/users/6"}], "http_etag": "\"e6babaa9d2120948c32eac37be8ecc5fa97ec778\"", + "http://localhost:9001/3.0/users/72"}], "http_etag": "\"55b55c82dc05af7c9192547fa1e1bafc02272d0d\"", "start": 0, "total_size": 1}'} headers: - content-length: ['485'] + content-length: ['486'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -234,13 +234,13 @@ 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": - "\"c71e2c46ed5770511b6fc62d56c05ed2f93dc6d2\"", "list_id": "foo.example.com", + "\"976a1391a5564cad880cade285eb2843b20d2c7b\"", "list_id": "foo.example.com", "member_id": 74, "moderation_action": "accept", "role": "moderator", "self_link": - "http://localhost:9001/3.0/members/74", "user": "http://localhost:9001/3.0/users/7"}], - "http_etag": "\"f36dc034fd855c48f223b50c69ea572e89582392\"", "start": 0, "total_size": + "http://localhost:9001/3.0/members/74", "user": "http://localhost:9001/3.0/users/73"}], + "http_etag": "\"e36a8ff989ec5990ba417c4efb42d4e4b350e480\"", "start": 0, "total_size": 1}'} headers: - content-length: ['497'] + content-length: ['498'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -251,10 +251,10 @@ uri: http://localhost:9001/3.0/users/moderator@example.com response: body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag": - "\"c7360c029a83c97672ca38dd8b008d48e05949a6\"", "is_server_owner": false, - "self_link": "http://localhost:9001/3.0/users/7", "user_id": 7}'} + "\"473b2615aa0b3a19fe77bc4c88fa9c56294b797b\"", "is_server_owner": false, + "self_link": "http://localhost:9001/3.0/users/73", "user_id": 73}'} headers: - content-length: ['188'] + content-length: ['190'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -262,16 +262,16 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode GET - uri: http://localhost:9001/3.0/users/7/addresses + uri: http://localhost:9001/3.0/users/73/addresses response: body: {string: !!python/unicode '{"entries": [{"email": "moderator@example.com", - "http_etag": "\"dc9e6ab7f685df3bdee82a1b48abcc345c24c317\"", "original_email": + "http_etag": "\"a3f8f5ed00f8ec50954bb71a727d9f21f2bde8c2\"", "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/7"}], - "http_etag": "\"61e6b2b734fab9e85bac3022e2728ddca6d73b95\"", "start": 0, "total_size": + "http://localhost:9001/3.0/addresses/moderator@example.com", "user": "http://localhost:9001/3.0/users/73"}], + "http_etag": "\"f524c811041c48ce45b2dd8fb86e39e412b879dc\"", "start": 0, "total_size": 1}'} headers: - content-length: ['402'] + content-length: ['403'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -297,13 +297,13 @@ 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": "\"478c5bd47f1c5bd648eecef1b47457fcae9b502c\"", + "delivery_mode": "regular", "email": "owner@example.com", "http_etag": "\"961c6a7eab998b92188a100be2aeea743eeae1bb\"", "list_id": "foo.example.com", "member_id": 73, "moderation_action": "accept", "role": "owner", "self_link": "http://localhost:9001/3.0/members/73", "user": - "http://localhost:9001/3.0/users/6"}], "http_etag": "\"e6babaa9d2120948c32eac37be8ecc5fa97ec778\"", + "http://localhost:9001/3.0/users/72"}], "http_etag": "\"55b55c82dc05af7c9192547fa1e1bafc02272d0d\"", "start": 0, "total_size": 1}'} headers: - content-length: ['485'] + content-length: ['486'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -315,13 +315,13 @@ 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": - "\"c71e2c46ed5770511b6fc62d56c05ed2f93dc6d2\"", "list_id": "foo.example.com", + "\"976a1391a5564cad880cade285eb2843b20d2c7b\"", "list_id": "foo.example.com", "member_id": 74, "moderation_action": "accept", "role": "moderator", "self_link": - "http://localhost:9001/3.0/members/74", "user": "http://localhost:9001/3.0/users/7"}], - "http_etag": "\"f36dc034fd855c48f223b50c69ea572e89582392\"", "start": 0, "total_size": + "http://localhost:9001/3.0/members/74", "user": "http://localhost:9001/3.0/users/73"}], + "http_etag": "\"e36a8ff989ec5990ba417c4efb42d4e4b350e480\"", "start": 0, "total_size": 1}'} headers: - content-length: ['497'] + content-length: ['498'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -332,10 +332,10 @@ uri: http://localhost:9001/3.0/users/moderator@example.com response: body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag": - "\"c7360c029a83c97672ca38dd8b008d48e05949a6\"", "is_server_owner": false, - "self_link": "http://localhost:9001/3.0/users/7", "user_id": 7}'} + "\"473b2615aa0b3a19fe77bc4c88fa9c56294b797b\"", "is_server_owner": false, + "self_link": "http://localhost:9001/3.0/users/73", "user_id": 73}'} headers: - content-length: ['188'] + content-length: ['190'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -343,16 +343,16 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode GET - uri: http://localhost:9001/3.0/users/7/addresses + uri: http://localhost:9001/3.0/users/73/addresses response: body: {string: !!python/unicode '{"entries": [{"email": "moderator@example.com", - "http_etag": "\"dc9e6ab7f685df3bdee82a1b48abcc345c24c317\"", "original_email": + "http_etag": "\"a3f8f5ed00f8ec50954bb71a727d9f21f2bde8c2\"", "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/7"}], - "http_etag": "\"61e6b2b734fab9e85bac3022e2728ddca6d73b95\"", "start": 0, "total_size": + "http://localhost:9001/3.0/addresses/moderator@example.com", "user": "http://localhost:9001/3.0/users/73"}], + "http_etag": "\"f524c811041c48ce45b2dd8fb86e39e412b879dc\"", "start": 0, "total_size": 1}'} headers: - content-length: ['402'] + content-length: ['403'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -378,13 +378,13 @@ 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": "\"478c5bd47f1c5bd648eecef1b47457fcae9b502c\"", + "delivery_mode": "regular", "email": "owner@example.com", "http_etag": "\"961c6a7eab998b92188a100be2aeea743eeae1bb\"", "list_id": "foo.example.com", "member_id": 73, "moderation_action": "accept", "role": "owner", "self_link": "http://localhost:9001/3.0/members/73", "user": - "http://localhost:9001/3.0/users/6"}], "http_etag": "\"e6babaa9d2120948c32eac37be8ecc5fa97ec778\"", + "http://localhost:9001/3.0/users/72"}], "http_etag": "\"55b55c82dc05af7c9192547fa1e1bafc02272d0d\"", "start": 0, "total_size": 1}'} headers: - content-length: ['485'] + content-length: ['486'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -396,13 +396,13 @@ 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": - "\"c71e2c46ed5770511b6fc62d56c05ed2f93dc6d2\"", "list_id": "foo.example.com", + "\"976a1391a5564cad880cade285eb2843b20d2c7b\"", "list_id": "foo.example.com", "member_id": 74, "moderation_action": "accept", "role": "moderator", "self_link": - "http://localhost:9001/3.0/members/74", "user": "http://localhost:9001/3.0/users/7"}], - "http_etag": "\"f36dc034fd855c48f223b50c69ea572e89582392\"", "start": 0, "total_size": + "http://localhost:9001/3.0/members/74", "user": "http://localhost:9001/3.0/users/73"}], + "http_etag": "\"e36a8ff989ec5990ba417c4efb42d4e4b350e480\"", "start": 0, "total_size": 1}'} headers: - content-length: ['497'] + content-length: ['498'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -413,10 +413,10 @@ uri: http://localhost:9001/3.0/users/moderator@example.com response: body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag": - "\"c7360c029a83c97672ca38dd8b008d48e05949a6\"", "is_server_owner": false, - "self_link": "http://localhost:9001/3.0/users/7", "user_id": 7}'} + "\"473b2615aa0b3a19fe77bc4c88fa9c56294b797b\"", "is_server_owner": false, + "self_link": "http://localhost:9001/3.0/users/73", "user_id": 73}'} headers: - content-length: ['188'] + content-length: ['190'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -424,16 +424,16 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode GET - uri: http://localhost:9001/3.0/users/7/addresses + uri: http://localhost:9001/3.0/users/73/addresses response: body: {string: !!python/unicode '{"entries": [{"email": "moderator@example.com", - "http_etag": "\"dc9e6ab7f685df3bdee82a1b48abcc345c24c317\"", "original_email": + "http_etag": "\"a3f8f5ed00f8ec50954bb71a727d9f21f2bde8c2\"", "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/7"}], - "http_etag": "\"61e6b2b734fab9e85bac3022e2728ddca6d73b95\"", "start": 0, "total_size": + "http://localhost:9001/3.0/addresses/moderator@example.com", "user": "http://localhost:9001/3.0/users/73"}], + "http_etag": "\"f524c811041c48ce45b2dd8fb86e39e412b879dc\"", "start": 0, "total_size": 1}'} headers: - content-length: ['402'] + content-length: ['403'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -459,13 +459,13 @@ 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": "\"478c5bd47f1c5bd648eecef1b47457fcae9b502c\"", + "delivery_mode": "regular", "email": "owner@example.com", "http_etag": "\"961c6a7eab998b92188a100be2aeea743eeae1bb\"", "list_id": "foo.example.com", "member_id": 73, "moderation_action": "accept", "role": "owner", "self_link": "http://localhost:9001/3.0/members/73", "user": - "http://localhost:9001/3.0/users/6"}], "http_etag": "\"e6babaa9d2120948c32eac37be8ecc5fa97ec778\"", + "http://localhost:9001/3.0/users/72"}], "http_etag": "\"55b55c82dc05af7c9192547fa1e1bafc02272d0d\"", "start": 0, "total_size": 1}'} headers: - content-length: ['485'] + content-length: ['486'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -477,13 +477,13 @@ 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": - "\"c71e2c46ed5770511b6fc62d56c05ed2f93dc6d2\"", "list_id": "foo.example.com", + "\"976a1391a5564cad880cade285eb2843b20d2c7b\"", "list_id": "foo.example.com", "member_id": 74, "moderation_action": "accept", "role": "moderator", "self_link": - "http://localhost:9001/3.0/members/74", "user": "http://localhost:9001/3.0/users/7"}], - "http_etag": "\"f36dc034fd855c48f223b50c69ea572e89582392\"", "start": 0, "total_size": + "http://localhost:9001/3.0/members/74", "user": "http://localhost:9001/3.0/users/73"}], + "http_etag": "\"e36a8ff989ec5990ba417c4efb42d4e4b350e480\"", "start": 0, "total_size": 1}'} headers: - content-length: ['497'] + content-length: ['498'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -494,10 +494,10 @@ uri: http://localhost:9001/3.0/users/moderator@example.com response: body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag": - "\"c7360c029a83c97672ca38dd8b008d48e05949a6\"", "is_server_owner": false, - "self_link": "http://localhost:9001/3.0/users/7", "user_id": 7}'} + "\"473b2615aa0b3a19fe77bc4c88fa9c56294b797b\"", "is_server_owner": false, + "self_link": "http://localhost:9001/3.0/users/73", "user_id": 73}'} headers: - content-length: ['188'] + content-length: ['190'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -505,16 +505,16 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode GET - uri: http://localhost:9001/3.0/users/7/addresses + uri: http://localhost:9001/3.0/users/73/addresses response: body: {string: !!python/unicode '{"entries": [{"email": "moderator@example.com", - "http_etag": "\"dc9e6ab7f685df3bdee82a1b48abcc345c24c317\"", "original_email": + "http_etag": "\"a3f8f5ed00f8ec50954bb71a727d9f21f2bde8c2\"", "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/7"}], - "http_etag": "\"61e6b2b734fab9e85bac3022e2728ddca6d73b95\"", "start": 0, "total_size": + "http://localhost:9001/3.0/addresses/moderator@example.com", "user": "http://localhost:9001/3.0/users/73"}], + "http_etag": "\"f524c811041c48ce45b2dd8fb86e39e412b879dc\"", "start": 0, "total_size": 1}'} headers: - content-length: ['402'] + content-length: ['403'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -540,13 +540,13 @@ 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": "\"478c5bd47f1c5bd648eecef1b47457fcae9b502c\"", + "delivery_mode": "regular", "email": "owner@example.com", "http_etag": "\"961c6a7eab998b92188a100be2aeea743eeae1bb\"", "list_id": "foo.example.com", "member_id": 73, "moderation_action": "accept", "role": "owner", "self_link": "http://localhost:9001/3.0/members/73", "user": - "http://localhost:9001/3.0/users/6"}], "http_etag": "\"e6babaa9d2120948c32eac37be8ecc5fa97ec778\"", + "http://localhost:9001/3.0/users/72"}], "http_etag": "\"55b55c82dc05af7c9192547fa1e1bafc02272d0d\"", "start": 0, "total_size": 1}'} headers: - content-length: ['485'] + content-length: ['486'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -558,13 +558,13 @@ 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": - "\"c71e2c46ed5770511b6fc62d56c05ed2f93dc6d2\"", "list_id": "foo.example.com", + "\"976a1391a5564cad880cade285eb2843b20d2c7b\"", "list_id": "foo.example.com", "member_id": 74, "moderation_action": "accept", "role": "moderator", "self_link": - "http://localhost:9001/3.0/members/74", "user": "http://localhost:9001/3.0/users/7"}], - "http_etag": "\"f36dc034fd855c48f223b50c69ea572e89582392\"", "start": 0, "total_size": + "http://localhost:9001/3.0/members/74", "user": "http://localhost:9001/3.0/users/73"}], + "http_etag": "\"e36a8ff989ec5990ba417c4efb42d4e4b350e480\"", "start": 0, "total_size": 1}'} headers: - content-length: ['497'] + content-length: ['498'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -575,10 +575,10 @@ uri: http://localhost:9001/3.0/users/moderator@example.com response: body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag": - "\"c7360c029a83c97672ca38dd8b008d48e05949a6\"", "is_server_owner": false, - "self_link": "http://localhost:9001/3.0/users/7", "user_id": 7}'} + "\"473b2615aa0b3a19fe77bc4c88fa9c56294b797b\"", "is_server_owner": false, + "self_link": "http://localhost:9001/3.0/users/73", "user_id": 73}'} headers: - content-length: ['188'] + content-length: ['190'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -586,16 +586,16 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode GET - uri: http://localhost:9001/3.0/users/7/addresses + uri: http://localhost:9001/3.0/users/73/addresses response: body: {string: !!python/unicode '{"entries": [{"email": "moderator@example.com", - "http_etag": "\"dc9e6ab7f685df3bdee82a1b48abcc345c24c317\"", "original_email": + "http_etag": "\"a3f8f5ed00f8ec50954bb71a727d9f21f2bde8c2\"", "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/7"}], - "http_etag": "\"61e6b2b734fab9e85bac3022e2728ddca6d73b95\"", "start": 0, "total_size": + "http://localhost:9001/3.0/addresses/moderator@example.com", "user": "http://localhost:9001/3.0/users/73"}], + "http_etag": "\"f524c811041c48ce45b2dd8fb86e39e412b879dc\"", "start": 0, "total_size": 1}'} headers: - content-length: ['402'] + content-length: ['403'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -621,13 +621,13 @@ 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": "\"478c5bd47f1c5bd648eecef1b47457fcae9b502c\"", + "delivery_mode": "regular", "email": "owner@example.com", "http_etag": "\"961c6a7eab998b92188a100be2aeea743eeae1bb\"", "list_id": "foo.example.com", "member_id": 73, "moderation_action": "accept", "role": "owner", "self_link": "http://localhost:9001/3.0/members/73", "user": - "http://localhost:9001/3.0/users/6"}], "http_etag": "\"e6babaa9d2120948c32eac37be8ecc5fa97ec778\"", + "http://localhost:9001/3.0/users/72"}], "http_etag": "\"55b55c82dc05af7c9192547fa1e1bafc02272d0d\"", "start": 0, "total_size": 1}'} headers: - content-length: ['485'] + content-length: ['486'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -639,13 +639,29 @@ 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": - "\"c71e2c46ed5770511b6fc62d56c05ed2f93dc6d2\"", "list_id": "foo.example.com", + "\"976a1391a5564cad880cade285eb2843b20d2c7b\"", "list_id": "foo.example.com", "member_id": 74, "moderation_action": "accept", "role": "moderator", "self_link": - "http://localhost:9001/3.0/members/74", "user": "http://localhost:9001/3.0/users/7"}], - "http_etag": "\"f36dc034fd855c48f223b50c69ea572e89582392\"", "start": 0, "total_size": + "http://localhost:9001/3.0/members/74", "user": "http://localhost:9001/3.0/users/73"}], + "http_etag": "\"e36a8ff989ec5990ba417c4efb42d4e4b350e480\"", "start": 0, "total_size": 1}'} headers: - content-length: ['497'] + content-length: ['498'] + 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/domains + response: + body: {string: !!python/unicode '{"entries": [{"base_url": "http://example.com", + "description": null, "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", + "mail_host": "example.com", "self_link": "http://localhost:9001/3.0/domains/example.com", + "url_host": "example.com"}], "http_etag": "\"c385b155f8da284bf78dbe075e20f58a30c893ab\"", + "start": 0, "total_size": 1}'} + headers: + content-length: ['338'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -653,7 +669,36 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode DELETE - uri: http://localhost:9001/3.0/lists/foo@example.com + uri: http://localhost:9001/3.0/domains/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 + response: + body: {string: !!python/unicode '{"entries": [{"created_on": "2005-08-01T07:49:23", + "http_etag": "\"108eeb0cd5d01bafaf1f4b6b9a14a7cac7ba53ae\"", "is_server_owner": + false, "self_link": "http://localhost:9001/3.0/users/72", "user_id": 72}, + {"created_on": "2005-08-01T07:49:23", "http_etag": "\"473b2615aa0b3a19fe77bc4c88fa9c56294b797b\"", + "is_server_owner": false, "self_link": "http://localhost:9001/3.0/users/73", + "user_id": 73}], "http_etag": "\"1645112701bb1c5dc35bad2042c988a150723195\"", + "start": 0, "total_size": 2}'} + headers: + content-length: ['487'] + 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/72 response: body: {string: !!python/unicode ''} headers: @@ -664,7 +709,7 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode DELETE - uri: http://localhost:9001/3.0/domains/example.com + uri: http://localhost:9001/3.0/users/73 response: body: {string: !!python/unicode ''} headers: diff --git a/src/postorius/tests/fixtures/vcr_cassettes/ListSettingsTest.test_page_accessible_for_owner.yaml b/src/postorius/tests/fixtures/vcr_cassettes/ListSettingsTest.test_page_accessible_for_owner.yaml index 94d232b..1dc0b1d 100644 --- a/src/postorius/tests/fixtures/vcr_cassettes/ListSettingsTest.test_page_accessible_for_owner.yaml +++ b/src/postorius/tests/fixtures/vcr_cassettes/ListSettingsTest.test_page_accessible_for_owner.yaml @@ -89,10 +89,10 @@ uri: http://localhost:9001/3.0/users/owner@example.com response: body: {string: !!python/unicode '{"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}'} + "\"9bddc6c5439c7622ae030a2f5a3e159589e132e7\"", "is_server_owner": false, + "self_link": "http://localhost:9001/3.0/users/74", "user_id": 74}'} headers: - content-length: ['188'] + content-length: ['190'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -100,15 +100,15 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode GET - uri: http://localhost:9001/3.0/users/6/addresses + uri: http://localhost:9001/3.0/users/74/addresses response: body: {string: !!python/unicode '{"entries": [{"email": "owner@example.com", "http_etag": - "\"7efeccdd4edd0bed02cd2141365a115239f83be4\"", "original_email": "owner@example.com", + "\"47f20023c6c0e20213c949d6e7a4229edfeea3f5\"", "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/6"}], "http_etag": "\"a565f7d323e0a6ca5da35f6d965148fe4fe03fbb\"", + "user": "http://localhost:9001/3.0/users/74"}], "http_etag": "\"ac3c9fad9c5faf9219d8d109cfe846ac7b147cd5\"", "start": 0, "total_size": 1}'} headers: - content-length: ['390'] + content-length: ['391'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -134,13 +134,13 @@ 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": "\"8a07c3378200ac9188087ca51ca0c58e19233be3\"", + "delivery_mode": "regular", "email": "owner@example.com", "http_etag": "\"ba7a3922ff3007dc8f60d72cd3a03d3cbc994c58\"", "list_id": "foo.example.com", "member_id": 75, "moderation_action": "accept", "role": "owner", "self_link": "http://localhost:9001/3.0/members/75", "user": - "http://localhost:9001/3.0/users/6"}], "http_etag": "\"a0276262cbf3ff607c063b8ec27670ea3e13532f\"", + "http://localhost:9001/3.0/users/74"}], "http_etag": "\"f2f11704a9dd9cc09663c7f8b0e72db065fb4361\"", "start": 0, "total_size": 1}'} headers: - content-length: ['485'] + content-length: ['486'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -152,13 +152,13 @@ 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": - "\"97ac3fd660a7948315cfc1bb0325b3f4028fe12d\"", "list_id": "foo.example.com", + "\"096e2182b31f52b378abe1d7db7a6aae17a6004a\"", "list_id": "foo.example.com", "member_id": 76, "moderation_action": "accept", "role": "moderator", "self_link": - "http://localhost:9001/3.0/members/76", "user": "http://localhost:9001/3.0/users/7"}], - "http_etag": "\"1adaa52b697f2e8a46626ae3a9e17fc8770dffb3\"", "start": 0, "total_size": + "http://localhost:9001/3.0/members/76", "user": "http://localhost:9001/3.0/users/75"}], + "http_etag": "\"5e9a771ccdb6c18e403632e0e20c535a8af8d59f\"", "start": 0, "total_size": 1}'} headers: - content-length: ['497'] + content-length: ['498'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -217,10 +217,10 @@ uri: http://localhost:9001/3.0/users/owner@example.com response: body: {string: !!python/unicode '{"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}'} + "\"9bddc6c5439c7622ae030a2f5a3e159589e132e7\"", "is_server_owner": false, + "self_link": "http://localhost:9001/3.0/users/74", "user_id": 74}'} headers: - content-length: ['188'] + content-length: ['190'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -228,15 +228,15 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode GET - uri: http://localhost:9001/3.0/users/6/addresses + uri: http://localhost:9001/3.0/users/74/addresses response: body: {string: !!python/unicode '{"entries": [{"email": "owner@example.com", "http_etag": - "\"7efeccdd4edd0bed02cd2141365a115239f83be4\"", "original_email": "owner@example.com", + "\"47f20023c6c0e20213c949d6e7a4229edfeea3f5\"", "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/6"}], "http_etag": "\"a565f7d323e0a6ca5da35f6d965148fe4fe03fbb\"", + "user": "http://localhost:9001/3.0/users/74"}], "http_etag": "\"ac3c9fad9c5faf9219d8d109cfe846ac7b147cd5\"", "start": 0, "total_size": 1}'} headers: - content-length: ['390'] + content-length: ['391'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -262,13 +262,13 @@ 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": "\"8a07c3378200ac9188087ca51ca0c58e19233be3\"", + "delivery_mode": "regular", "email": "owner@example.com", "http_etag": "\"ba7a3922ff3007dc8f60d72cd3a03d3cbc994c58\"", "list_id": "foo.example.com", "member_id": 75, "moderation_action": "accept", "role": "owner", "self_link": "http://localhost:9001/3.0/members/75", "user": - "http://localhost:9001/3.0/users/6"}], "http_etag": "\"a0276262cbf3ff607c063b8ec27670ea3e13532f\"", + "http://localhost:9001/3.0/users/74"}], "http_etag": "\"f2f11704a9dd9cc09663c7f8b0e72db065fb4361\"", "start": 0, "total_size": 1}'} headers: - content-length: ['485'] + content-length: ['486'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -280,13 +280,13 @@ 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": - "\"97ac3fd660a7948315cfc1bb0325b3f4028fe12d\"", "list_id": "foo.example.com", + "\"096e2182b31f52b378abe1d7db7a6aae17a6004a\"", "list_id": "foo.example.com", "member_id": 76, "moderation_action": "accept", "role": "moderator", "self_link": - "http://localhost:9001/3.0/members/76", "user": "http://localhost:9001/3.0/users/7"}], - "http_etag": "\"1adaa52b697f2e8a46626ae3a9e17fc8770dffb3\"", "start": 0, "total_size": + "http://localhost:9001/3.0/members/76", "user": "http://localhost:9001/3.0/users/75"}], + "http_etag": "\"5e9a771ccdb6c18e403632e0e20c535a8af8d59f\"", "start": 0, "total_size": 1}'} headers: - content-length: ['497'] + content-length: ['498'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -345,10 +345,10 @@ uri: http://localhost:9001/3.0/users/owner@example.com response: body: {string: !!python/unicode '{"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}'} + "\"9bddc6c5439c7622ae030a2f5a3e159589e132e7\"", "is_server_owner": false, + "self_link": "http://localhost:9001/3.0/users/74", "user_id": 74}'} headers: - content-length: ['188'] + content-length: ['190'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -356,15 +356,15 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode GET - uri: http://localhost:9001/3.0/users/6/addresses + uri: http://localhost:9001/3.0/users/74/addresses response: body: {string: !!python/unicode '{"entries": [{"email": "owner@example.com", "http_etag": - "\"7efeccdd4edd0bed02cd2141365a115239f83be4\"", "original_email": "owner@example.com", + "\"47f20023c6c0e20213c949d6e7a4229edfeea3f5\"", "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/6"}], "http_etag": "\"a565f7d323e0a6ca5da35f6d965148fe4fe03fbb\"", + "user": "http://localhost:9001/3.0/users/74"}], "http_etag": "\"ac3c9fad9c5faf9219d8d109cfe846ac7b147cd5\"", "start": 0, "total_size": 1}'} headers: - content-length: ['390'] + content-length: ['391'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -390,13 +390,13 @@ 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": "\"8a07c3378200ac9188087ca51ca0c58e19233be3\"", + "delivery_mode": "regular", "email": "owner@example.com", "http_etag": "\"ba7a3922ff3007dc8f60d72cd3a03d3cbc994c58\"", "list_id": "foo.example.com", "member_id": 75, "moderation_action": "accept", "role": "owner", "self_link": "http://localhost:9001/3.0/members/75", "user": - "http://localhost:9001/3.0/users/6"}], "http_etag": "\"a0276262cbf3ff607c063b8ec27670ea3e13532f\"", + "http://localhost:9001/3.0/users/74"}], "http_etag": "\"f2f11704a9dd9cc09663c7f8b0e72db065fb4361\"", "start": 0, "total_size": 1}'} headers: - content-length: ['485'] + content-length: ['486'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -408,269 +408,13 @@ 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": - "\"97ac3fd660a7948315cfc1bb0325b3f4028fe12d\"", "list_id": "foo.example.com", + "\"096e2182b31f52b378abe1d7db7a6aae17a6004a\"", "list_id": "foo.example.com", "member_id": 76, "moderation_action": "accept", "role": "moderator", "self_link": - "http://localhost:9001/3.0/members/76", "user": "http://localhost:9001/3.0/users/7"}], - "http_etag": "\"1adaa52b697f2e8a46626ae3a9e17fc8770dffb3\"", "start": 0, "total_size": + "http://localhost:9001/3.0/members/76", "user": "http://localhost:9001/3.0/users/75"}], + "http_etag": "\"5e9a771ccdb6c18e403632e0e20c535a8af8d59f\"", "start": 0, "total_size": 1}'} headers: - content-length: ['497'] - content-type: [application/json; charset=utf-8] - status: {code: 200, message: OK} -- request: - body: null - headers: - accept-encoding: ['gzip, deflate'] - method: !!python/unicode GET - uri: http://localhost:9001/3.0/lists/foo.example.com - response: - body: {string: !!python/unicode '{"display_name": "Foo", "fqdn_listname": "foo@example.com", - "http_etag": "\"698a819bbb6b902096a8c5543cc7fac2328960d5\"", "list_id": "foo.example.com", - "list_name": "foo", "mail_host": "example.com", "member_count": 0, "self_link": - "http://localhost:9001/3.0/lists/foo.example.com", "volume": 1}'} - headers: - content-length: ['294'] - content-type: [application/json; charset=utf-8] - 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/config - response: - body: {string: !!python/unicode '{"acceptable_aliases": [], "admin_immed_notify": - true, "admin_notify_mchanges": false, "administrivia": true, "advertised": - true, "allow_list_posts": true, "anonymous_list": false, "archive_policy": - "public", "autorespond_owner": "none", "autorespond_postings": "none", "autorespond_requests": - "none", "autoresponse_grace_period": "90d", "autoresponse_owner_text": "", - "autoresponse_postings_text": "", "autoresponse_request_text": "", "bounces_address": - "foo-bounces@example.com", "collapse_alternatives": true, "convert_html_to_plaintext": - false, "created_at": "2005-08-01T07:49:23", "default_member_action": "defer", - "default_nonmember_action": "hold", "description": "", "digest_last_sent_at": - null, "digest_send_periodic": true, "digest_size_threshold": 30.0, "digest_volume_frequency": - "monthly", "digests_enabled": true, "display_name": "Foo", "filter_content": - false, "first_strip_reply_to": false, "fqdn_listname": "foo@example.com", - "goodbye_message_uri": "", "http_etag": "\"97436ece60591c8bf4b4d589f6b8028a5a2964a3\"", - "include_rfc2369_headers": true, "join_address": "foo-join@example.com", "last_post_at": - null, "leave_address": "foo-leave@example.com", "list_name": "foo", "mail_host": - "example.com", "next_digest_number": 1, "no_reply_address": "noreply@example.com", - "owner_address": "foo-owner@example.com", "post_id": 1, "posting_address": - "foo@example.com", "posting_pipeline": "default-posting-pipeline", "reply_goes_to_list": - "no_munging", "reply_to_address": "", "request_address": "foo-request@example.com", - "scheme": "http", "send_welcome_message": true, "subject_prefix": "[Foo] ", - "subscription_policy": "confirm", "volume": 1, "web_host": "example.com", - "welcome_message_uri": "mailman:///welcome.txt"}'} - headers: - content-length: ['1730'] - 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/owner@example.com - response: - body: {string: !!python/unicode '{"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}'} - headers: - 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/6/addresses - response: - body: {string: !!python/unicode '{"entries": [{"email": "owner@example.com", "http_etag": - "\"7efeccdd4edd0bed02cd2141365a115239f83be4\"", "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/6"}], "http_etag": "\"a565f7d323e0a6ca5da35f6d965148fe4fe03fbb\"", - "start": 0, "total_size": 1}'} - headers: - content-length: ['390'] - content-type: [application/json; charset=utf-8] - status: {code: 200, message: OK} -- request: - body: null - headers: - accept-encoding: ['gzip, deflate'] - method: !!python/unicode GET - uri: http://localhost:9001/3.0/lists/foo.example.com - response: - body: {string: !!python/unicode '{"display_name": "Foo", "fqdn_listname": "foo@example.com", - "http_etag": "\"698a819bbb6b902096a8c5543cc7fac2328960d5\"", "list_id": "foo.example.com", - "list_name": "foo", "mail_host": "example.com", "member_count": 0, "self_link": - "http://localhost:9001/3.0/lists/foo.example.com", "volume": 1}'} - headers: - content-length: ['294'] - content-type: [application/json; charset=utf-8] - 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/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": "\"8a07c3378200ac9188087ca51ca0c58e19233be3\"", - "list_id": "foo.example.com", "member_id": 75, "moderation_action": "accept", - "role": "owner", "self_link": "http://localhost:9001/3.0/members/75", "user": - "http://localhost:9001/3.0/users/6"}], "http_etag": "\"a0276262cbf3ff607c063b8ec27670ea3e13532f\"", - "start": 0, "total_size": 1}'} - headers: - 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 GET - uri: http://localhost:9001/3.0/lists/foo.example.com/roster/moderator - response: - body: {string: !!python/unicode '{"entries": [{"address": "http://localhost:9001/3.0/addresses/moderator@example.com", - "delivery_mode": "regular", "email": "moderator@example.com", "http_etag": - "\"97ac3fd660a7948315cfc1bb0325b3f4028fe12d\"", "list_id": "foo.example.com", - "member_id": 76, "moderation_action": "accept", "role": "moderator", "self_link": - "http://localhost:9001/3.0/members/76", "user": "http://localhost:9001/3.0/users/7"}], - "http_etag": "\"1adaa52b697f2e8a46626ae3a9e17fc8770dffb3\"", "start": 0, "total_size": - 1}'} - headers: - content-length: ['497'] - content-type: [application/json; charset=utf-8] - status: {code: 200, message: OK} -- request: - body: null - headers: - accept-encoding: ['gzip, deflate'] - method: !!python/unicode GET - uri: http://localhost:9001/3.0/lists/foo.example.com - response: - body: {string: !!python/unicode '{"display_name": "Foo", "fqdn_listname": "foo@example.com", - "http_etag": "\"698a819bbb6b902096a8c5543cc7fac2328960d5\"", "list_id": "foo.example.com", - "list_name": "foo", "mail_host": "example.com", "member_count": 0, "self_link": - "http://localhost:9001/3.0/lists/foo.example.com", "volume": 1}'} - headers: - content-length: ['294'] - content-type: [application/json; charset=utf-8] - 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/config - response: - body: {string: !!python/unicode '{"acceptable_aliases": [], "admin_immed_notify": - true, "admin_notify_mchanges": false, "administrivia": true, "advertised": - true, "allow_list_posts": true, "anonymous_list": false, "archive_policy": - "public", "autorespond_owner": "none", "autorespond_postings": "none", "autorespond_requests": - "none", "autoresponse_grace_period": "90d", "autoresponse_owner_text": "", - "autoresponse_postings_text": "", "autoresponse_request_text": "", "bounces_address": - "foo-bounces@example.com", "collapse_alternatives": true, "convert_html_to_plaintext": - false, "created_at": "2005-08-01T07:49:23", "default_member_action": "defer", - "default_nonmember_action": "hold", "description": "", "digest_last_sent_at": - null, "digest_send_periodic": true, "digest_size_threshold": 30.0, "digest_volume_frequency": - "monthly", "digests_enabled": true, "display_name": "Foo", "filter_content": - false, "first_strip_reply_to": false, "fqdn_listname": "foo@example.com", - "goodbye_message_uri": "", "http_etag": "\"97436ece60591c8bf4b4d589f6b8028a5a2964a3\"", - "include_rfc2369_headers": true, "join_address": "foo-join@example.com", "last_post_at": - null, "leave_address": "foo-leave@example.com", "list_name": "foo", "mail_host": - "example.com", "next_digest_number": 1, "no_reply_address": "noreply@example.com", - "owner_address": "foo-owner@example.com", "post_id": 1, "posting_address": - "foo@example.com", "posting_pipeline": "default-posting-pipeline", "reply_goes_to_list": - "no_munging", "reply_to_address": "", "request_address": "foo-request@example.com", - "scheme": "http", "send_welcome_message": true, "subject_prefix": "[Foo] ", - "subscription_policy": "confirm", "volume": 1, "web_host": "example.com", - "welcome_message_uri": "mailman:///welcome.txt"}'} - headers: - content-length: ['1730'] - 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/owner@example.com - response: - body: {string: !!python/unicode '{"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}'} - headers: - 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/6/addresses - response: - body: {string: !!python/unicode '{"entries": [{"email": "owner@example.com", "http_etag": - "\"7efeccdd4edd0bed02cd2141365a115239f83be4\"", "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/6"}], "http_etag": "\"a565f7d323e0a6ca5da35f6d965148fe4fe03fbb\"", - "start": 0, "total_size": 1}'} - headers: - content-length: ['390'] - content-type: [application/json; charset=utf-8] - status: {code: 200, message: OK} -- request: - body: null - headers: - accept-encoding: ['gzip, deflate'] - method: !!python/unicode GET - uri: http://localhost:9001/3.0/lists/foo.example.com - response: - body: {string: !!python/unicode '{"display_name": "Foo", "fqdn_listname": "foo@example.com", - "http_etag": "\"698a819bbb6b902096a8c5543cc7fac2328960d5\"", "list_id": "foo.example.com", - "list_name": "foo", "mail_host": "example.com", "member_count": 0, "self_link": - "http://localhost:9001/3.0/lists/foo.example.com", "volume": 1}'} - headers: - content-length: ['294'] - content-type: [application/json; charset=utf-8] - 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/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": "\"8a07c3378200ac9188087ca51ca0c58e19233be3\"", - "list_id": "foo.example.com", "member_id": 75, "moderation_action": "accept", - "role": "owner", "self_link": "http://localhost:9001/3.0/members/75", "user": - "http://localhost:9001/3.0/users/6"}], "http_etag": "\"a0276262cbf3ff607c063b8ec27670ea3e13532f\"", - "start": 0, "total_size": 1}'} - headers: - 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 GET - uri: http://localhost:9001/3.0/lists/foo.example.com/roster/moderator - response: - body: {string: !!python/unicode '{"entries": [{"address": "http://localhost:9001/3.0/addresses/moderator@example.com", - "delivery_mode": "regular", "email": "moderator@example.com", "http_etag": - "\"97ac3fd660a7948315cfc1bb0325b3f4028fe12d\"", "list_id": "foo.example.com", - "member_id": 76, "moderation_action": "accept", "role": "moderator", "self_link": - "http://localhost:9001/3.0/members/76", "user": "http://localhost:9001/3.0/users/7"}], - "http_etag": "\"1adaa52b697f2e8a46626ae3a9e17fc8770dffb3\"", "start": 0, "total_size": - 1}'} - headers: - content-length: ['497'] + content-length: ['498'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -794,10 +538,10 @@ uri: http://localhost:9001/3.0/users/owner@example.com response: body: {string: !!python/unicode '{"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}'} + "\"9bddc6c5439c7622ae030a2f5a3e159589e132e7\"", "is_server_owner": false, + "self_link": "http://localhost:9001/3.0/users/74", "user_id": 74}'} headers: - content-length: ['188'] + content-length: ['190'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -805,15 +549,15 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode GET - uri: http://localhost:9001/3.0/users/6/addresses + uri: http://localhost:9001/3.0/users/74/addresses response: body: {string: !!python/unicode '{"entries": [{"email": "owner@example.com", "http_etag": - "\"7efeccdd4edd0bed02cd2141365a115239f83be4\"", "original_email": "owner@example.com", + "\"47f20023c6c0e20213c949d6e7a4229edfeea3f5\"", "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/6"}], "http_etag": "\"a565f7d323e0a6ca5da35f6d965148fe4fe03fbb\"", + "user": "http://localhost:9001/3.0/users/74"}], "http_etag": "\"ac3c9fad9c5faf9219d8d109cfe846ac7b147cd5\"", "start": 0, "total_size": 1}'} headers: - content-length: ['390'] + content-length: ['391'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -839,13 +583,13 @@ 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": "\"8a07c3378200ac9188087ca51ca0c58e19233be3\"", + "delivery_mode": "regular", "email": "owner@example.com", "http_etag": "\"ba7a3922ff3007dc8f60d72cd3a03d3cbc994c58\"", "list_id": "foo.example.com", "member_id": 75, "moderation_action": "accept", "role": "owner", "self_link": "http://localhost:9001/3.0/members/75", "user": - "http://localhost:9001/3.0/users/6"}], "http_etag": "\"a0276262cbf3ff607c063b8ec27670ea3e13532f\"", + "http://localhost:9001/3.0/users/74"}], "http_etag": "\"f2f11704a9dd9cc09663c7f8b0e72db065fb4361\"", "start": 0, "total_size": 1}'} headers: - content-length: ['485'] + content-length: ['486'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -857,13 +601,13 @@ 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": - "\"97ac3fd660a7948315cfc1bb0325b3f4028fe12d\"", "list_id": "foo.example.com", + "\"096e2182b31f52b378abe1d7db7a6aae17a6004a\"", "list_id": "foo.example.com", "member_id": 76, "moderation_action": "accept", "role": "moderator", "self_link": - "http://localhost:9001/3.0/members/76", "user": "http://localhost:9001/3.0/users/7"}], - "http_etag": "\"1adaa52b697f2e8a46626ae3a9e17fc8770dffb3\"", "start": 0, "total_size": + "http://localhost:9001/3.0/members/76", "user": "http://localhost:9001/3.0/users/75"}], + "http_etag": "\"5e9a771ccdb6c18e403632e0e20c535a8af8d59f\"", "start": 0, "total_size": 1}'} headers: - content-length: ['497'] + content-length: ['498'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -922,10 +666,10 @@ uri: http://localhost:9001/3.0/users/owner@example.com response: body: {string: !!python/unicode '{"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}'} + "\"9bddc6c5439c7622ae030a2f5a3e159589e132e7\"", "is_server_owner": false, + "self_link": "http://localhost:9001/3.0/users/74", "user_id": 74}'} headers: - content-length: ['188'] + content-length: ['190'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -933,15 +677,15 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode GET - uri: http://localhost:9001/3.0/users/6/addresses + uri: http://localhost:9001/3.0/users/74/addresses response: body: {string: !!python/unicode '{"entries": [{"email": "owner@example.com", "http_etag": - "\"7efeccdd4edd0bed02cd2141365a115239f83be4\"", "original_email": "owner@example.com", + "\"47f20023c6c0e20213c949d6e7a4229edfeea3f5\"", "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/6"}], "http_etag": "\"a565f7d323e0a6ca5da35f6d965148fe4fe03fbb\"", + "user": "http://localhost:9001/3.0/users/74"}], "http_etag": "\"ac3c9fad9c5faf9219d8d109cfe846ac7b147cd5\"", "start": 0, "total_size": 1}'} headers: - content-length: ['390'] + content-length: ['391'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -967,13 +711,13 @@ 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": "\"8a07c3378200ac9188087ca51ca0c58e19233be3\"", + "delivery_mode": "regular", "email": "owner@example.com", "http_etag": "\"ba7a3922ff3007dc8f60d72cd3a03d3cbc994c58\"", "list_id": "foo.example.com", "member_id": 75, "moderation_action": "accept", "role": "owner", "self_link": "http://localhost:9001/3.0/members/75", "user": - "http://localhost:9001/3.0/users/6"}], "http_etag": "\"a0276262cbf3ff607c063b8ec27670ea3e13532f\"", + "http://localhost:9001/3.0/users/74"}], "http_etag": "\"f2f11704a9dd9cc09663c7f8b0e72db065fb4361\"", "start": 0, "total_size": 1}'} headers: - content-length: ['485'] + content-length: ['486'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -985,13 +729,13 @@ 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": - "\"97ac3fd660a7948315cfc1bb0325b3f4028fe12d\"", "list_id": "foo.example.com", + "\"096e2182b31f52b378abe1d7db7a6aae17a6004a\"", "list_id": "foo.example.com", "member_id": 76, "moderation_action": "accept", "role": "moderator", "self_link": - "http://localhost:9001/3.0/members/76", "user": "http://localhost:9001/3.0/users/7"}], - "http_etag": "\"1adaa52b697f2e8a46626ae3a9e17fc8770dffb3\"", "start": 0, "total_size": + "http://localhost:9001/3.0/members/76", "user": "http://localhost:9001/3.0/users/75"}], + "http_etag": "\"5e9a771ccdb6c18e403632e0e20c535a8af8d59f\"", "start": 0, "total_size": 1}'} headers: - content-length: ['497'] + content-length: ['498'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -1046,8 +790,309 @@ body: null headers: accept-encoding: ['gzip, deflate'] + method: !!python/unicode GET + uri: http://localhost:9001/3.0/users/owner@example.com + response: + body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag": + "\"9bddc6c5439c7622ae030a2f5a3e159589e132e7\"", "is_server_owner": false, + "self_link": "http://localhost:9001/3.0/users/74", "user_id": 74}'} + headers: + content-length: ['190'] + 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/74/addresses + response: + body: {string: !!python/unicode '{"entries": [{"email": "owner@example.com", "http_etag": + "\"47f20023c6c0e20213c949d6e7a4229edfeea3f5\"", "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/74"}], "http_etag": "\"ac3c9fad9c5faf9219d8d109cfe846ac7b147cd5\"", + "start": 0, "total_size": 1}'} + headers: + content-length: ['391'] + content-type: [application/json; charset=utf-8] + status: {code: 200, message: OK} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + method: !!python/unicode GET + uri: http://localhost:9001/3.0/lists/foo.example.com + response: + body: {string: !!python/unicode '{"display_name": "Foo", "fqdn_listname": "foo@example.com", + "http_etag": "\"698a819bbb6b902096a8c5543cc7fac2328960d5\"", "list_id": "foo.example.com", + "list_name": "foo", "mail_host": "example.com", "member_count": 0, "self_link": + "http://localhost:9001/3.0/lists/foo.example.com", "volume": 1}'} + headers: + content-length: ['294'] + content-type: [application/json; charset=utf-8] + 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/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": "\"ba7a3922ff3007dc8f60d72cd3a03d3cbc994c58\"", + "list_id": "foo.example.com", "member_id": 75, "moderation_action": "accept", + "role": "owner", "self_link": "http://localhost:9001/3.0/members/75", "user": + "http://localhost:9001/3.0/users/74"}], "http_etag": "\"f2f11704a9dd9cc09663c7f8b0e72db065fb4361\"", + "start": 0, "total_size": 1}'} + headers: + content-length: ['486'] + 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/moderator + 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": + "\"096e2182b31f52b378abe1d7db7a6aae17a6004a\"", "list_id": "foo.example.com", + "member_id": 76, "moderation_action": "accept", "role": "moderator", "self_link": + "http://localhost:9001/3.0/members/76", "user": "http://localhost:9001/3.0/users/75"}], + "http_etag": "\"5e9a771ccdb6c18e403632e0e20c535a8af8d59f\"", "start": 0, "total_size": + 1}'} + headers: + content-length: ['498'] + content-type: [application/json; charset=utf-8] + status: {code: 200, message: OK} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + method: !!python/unicode GET + uri: http://localhost:9001/3.0/lists/foo.example.com + response: + body: {string: !!python/unicode '{"display_name": "Foo", "fqdn_listname": "foo@example.com", + "http_etag": "\"698a819bbb6b902096a8c5543cc7fac2328960d5\"", "list_id": "foo.example.com", + "list_name": "foo", "mail_host": "example.com", "member_count": 0, "self_link": + "http://localhost:9001/3.0/lists/foo.example.com", "volume": 1}'} + headers: + content-length: ['294'] + content-type: [application/json; charset=utf-8] + 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/config + response: + body: {string: !!python/unicode '{"acceptable_aliases": [], "admin_immed_notify": + true, "admin_notify_mchanges": false, "administrivia": true, "advertised": + true, "allow_list_posts": true, "anonymous_list": false, "archive_policy": + "public", "autorespond_owner": "none", "autorespond_postings": "none", "autorespond_requests": + "none", "autoresponse_grace_period": "90d", "autoresponse_owner_text": "", + "autoresponse_postings_text": "", "autoresponse_request_text": "", "bounces_address": + "foo-bounces@example.com", "collapse_alternatives": true, "convert_html_to_plaintext": + false, "created_at": "2005-08-01T07:49:23", "default_member_action": "defer", + "default_nonmember_action": "hold", "description": "", "digest_last_sent_at": + null, "digest_send_periodic": true, "digest_size_threshold": 30.0, "digest_volume_frequency": + "monthly", "digests_enabled": true, "display_name": "Foo", "filter_content": + false, "first_strip_reply_to": false, "fqdn_listname": "foo@example.com", + "goodbye_message_uri": "", "http_etag": "\"97436ece60591c8bf4b4d589f6b8028a5a2964a3\"", + "include_rfc2369_headers": true, "join_address": "foo-join@example.com", "last_post_at": + null, "leave_address": "foo-leave@example.com", "list_name": "foo", "mail_host": + "example.com", "next_digest_number": 1, "no_reply_address": "noreply@example.com", + "owner_address": "foo-owner@example.com", "post_id": 1, "posting_address": + "foo@example.com", "posting_pipeline": "default-posting-pipeline", "reply_goes_to_list": + "no_munging", "reply_to_address": "", "request_address": "foo-request@example.com", + "scheme": "http", "send_welcome_message": true, "subject_prefix": "[Foo] ", + "subscription_policy": "confirm", "volume": 1, "web_host": "example.com", + "welcome_message_uri": "mailman:///welcome.txt"}'} + headers: + content-length: ['1730'] + 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/owner@example.com + response: + body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag": + "\"9bddc6c5439c7622ae030a2f5a3e159589e132e7\"", "is_server_owner": false, + "self_link": "http://localhost:9001/3.0/users/74", "user_id": 74}'} + headers: + content-length: ['190'] + 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/74/addresses + response: + body: {string: !!python/unicode '{"entries": [{"email": "owner@example.com", "http_etag": + "\"47f20023c6c0e20213c949d6e7a4229edfeea3f5\"", "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/74"}], "http_etag": "\"ac3c9fad9c5faf9219d8d109cfe846ac7b147cd5\"", + "start": 0, "total_size": 1}'} + headers: + content-length: ['391'] + content-type: [application/json; charset=utf-8] + status: {code: 200, message: OK} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + method: !!python/unicode GET + uri: http://localhost:9001/3.0/lists/foo.example.com + response: + body: {string: !!python/unicode '{"display_name": "Foo", "fqdn_listname": "foo@example.com", + "http_etag": "\"698a819bbb6b902096a8c5543cc7fac2328960d5\"", "list_id": "foo.example.com", + "list_name": "foo", "mail_host": "example.com", "member_count": 0, "self_link": + "http://localhost:9001/3.0/lists/foo.example.com", "volume": 1}'} + headers: + content-length: ['294'] + content-type: [application/json; charset=utf-8] + 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/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": "\"ba7a3922ff3007dc8f60d72cd3a03d3cbc994c58\"", + "list_id": "foo.example.com", "member_id": 75, "moderation_action": "accept", + "role": "owner", "self_link": "http://localhost:9001/3.0/members/75", "user": + "http://localhost:9001/3.0/users/74"}], "http_etag": "\"f2f11704a9dd9cc09663c7f8b0e72db065fb4361\"", + "start": 0, "total_size": 1}'} + headers: + content-length: ['486'] + 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/moderator + 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": + "\"096e2182b31f52b378abe1d7db7a6aae17a6004a\"", "list_id": "foo.example.com", + "member_id": 76, "moderation_action": "accept", "role": "moderator", "self_link": + "http://localhost:9001/3.0/members/76", "user": "http://localhost:9001/3.0/users/75"}], + "http_etag": "\"5e9a771ccdb6c18e403632e0e20c535a8af8d59f\"", "start": 0, "total_size": + 1}'} + headers: + content-length: ['498'] + content-type: [application/json; charset=utf-8] + status: {code: 200, message: OK} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + method: !!python/unicode GET + uri: http://localhost:9001/3.0/lists/foo.example.com + response: + body: {string: !!python/unicode '{"display_name": "Foo", "fqdn_listname": "foo@example.com", + "http_etag": "\"698a819bbb6b902096a8c5543cc7fac2328960d5\"", "list_id": "foo.example.com", + "list_name": "foo", "mail_host": "example.com", "member_count": 0, "self_link": + "http://localhost:9001/3.0/lists/foo.example.com", "volume": 1}'} + headers: + content-length: ['294'] + content-type: [application/json; charset=utf-8] + 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/config + response: + body: {string: !!python/unicode '{"acceptable_aliases": [], "admin_immed_notify": + true, "admin_notify_mchanges": false, "administrivia": true, "advertised": + true, "allow_list_posts": true, "anonymous_list": false, "archive_policy": + "public", "autorespond_owner": "none", "autorespond_postings": "none", "autorespond_requests": + "none", "autoresponse_grace_period": "90d", "autoresponse_owner_text": "", + "autoresponse_postings_text": "", "autoresponse_request_text": "", "bounces_address": + "foo-bounces@example.com", "collapse_alternatives": true, "convert_html_to_plaintext": + false, "created_at": "2005-08-01T07:49:23", "default_member_action": "defer", + "default_nonmember_action": "hold", "description": "", "digest_last_sent_at": + null, "digest_send_periodic": true, "digest_size_threshold": 30.0, "digest_volume_frequency": + "monthly", "digests_enabled": true, "display_name": "Foo", "filter_content": + false, "first_strip_reply_to": false, "fqdn_listname": "foo@example.com", + "goodbye_message_uri": "", "http_etag": "\"97436ece60591c8bf4b4d589f6b8028a5a2964a3\"", + "include_rfc2369_headers": true, "join_address": "foo-join@example.com", "last_post_at": + null, "leave_address": "foo-leave@example.com", "list_name": "foo", "mail_host": + "example.com", "next_digest_number": 1, "no_reply_address": "noreply@example.com", + "owner_address": "foo-owner@example.com", "post_id": 1, "posting_address": + "foo@example.com", "posting_pipeline": "default-posting-pipeline", "reply_goes_to_list": + "no_munging", "reply_to_address": "", "request_address": "foo-request@example.com", + "scheme": "http", "send_welcome_message": true, "subject_prefix": "[Foo] ", + "subscription_policy": "confirm", "volume": 1, "web_host": "example.com", + "welcome_message_uri": "mailman:///welcome.txt"}'} + headers: + content-length: ['1730'] + 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/domains + response: + body: {string: !!python/unicode '{"entries": [{"base_url": "http://example.com", + "description": null, "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", + "mail_host": "example.com", "self_link": "http://localhost:9001/3.0/domains/example.com", + "url_host": "example.com"}], "http_etag": "\"c385b155f8da284bf78dbe075e20f58a30c893ab\"", + "start": 0, "total_size": 1}'} + headers: + content-length: ['338'] + content-type: [application/json; charset=utf-8] + status: {code: 200, message: OK} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] method: !!python/unicode DELETE - uri: http://localhost:9001/3.0/lists/foo@example.com + uri: http://localhost:9001/3.0/domains/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 + response: + body: {string: !!python/unicode '{"entries": [{"created_on": "2005-08-01T07:49:23", + "http_etag": "\"9bddc6c5439c7622ae030a2f5a3e159589e132e7\"", "is_server_owner": + false, "self_link": "http://localhost:9001/3.0/users/74", "user_id": 74}, + {"created_on": "2005-08-01T07:49:23", "http_etag": "\"135bcc249458348f1154332ff3ef40ec6e11c1af\"", + "is_server_owner": false, "self_link": "http://localhost:9001/3.0/users/75", + "user_id": 75}], "http_etag": "\"50a76eded7380f1a559dd2e775667530fa2d3b68\"", + "start": 0, "total_size": 2}'} + headers: + content-length: ['487'] + 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/74 response: body: {string: !!python/unicode ''} headers: @@ -1058,7 +1103,7 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode DELETE - uri: http://localhost:9001/3.0/domains/example.com + uri: http://localhost:9001/3.0/users/75 response: body: {string: !!python/unicode ''} headers: diff --git a/src/postorius/tests/fixtures/vcr_cassettes/ListSettingsTest.test_page_accessible_for_superuser.yaml b/src/postorius/tests/fixtures/vcr_cassettes/ListSettingsTest.test_page_accessible_for_superuser.yaml index a594bd7..3ee6dee 100644 --- a/src/postorius/tests/fixtures/vcr_cassettes/ListSettingsTest.test_page_accessible_for_superuser.yaml +++ b/src/postorius/tests/fixtures/vcr_cassettes/ListSettingsTest.test_page_accessible_for_superuser.yaml @@ -88,29 +88,11 @@ method: !!python/unicode GET uri: http://localhost:9001/3.0/users/su@example.com response: - body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag": - "\"bb1c2e6094a96b17e2d5dbf487291f7667f69f75\"", "is_server_owner": false, - "self_link": "http://localhost:9001/3.0/users/3", "user_id": 3}'} + body: {string: !!python/unicode 404 Not Found} headers: - content-length: ['188'] + content-length: ['13'] 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/3/addresses - response: - body: {string: !!python/unicode '{"entries": [{"email": "su@example.com", "http_etag": - "\"91c297417f4c33cf707148d031e79b6cb316f158\"", "original_email": "su@example.com", - "registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/su@example.com", - "user": "http://localhost:9001/3.0/users/3"}], "http_etag": "\"e9a7c409726b93f93aaf643fce49558cf27237e1\"", - "start": 0, "total_size": 1}'} - headers: - content-length: ['381'] - content-type: [application/json; charset=utf-8] - status: {code: 200, message: OK} + status: {code: 404, message: Not Found} - request: body: null headers: @@ -166,29 +148,11 @@ method: !!python/unicode GET uri: http://localhost:9001/3.0/users/su@example.com response: - body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag": - "\"bb1c2e6094a96b17e2d5dbf487291f7667f69f75\"", "is_server_owner": false, - "self_link": "http://localhost:9001/3.0/users/3", "user_id": 3}'} + body: {string: !!python/unicode 404 Not Found} headers: - content-length: ['188'] + content-length: ['13'] 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/3/addresses - response: - body: {string: !!python/unicode '{"entries": [{"email": "su@example.com", "http_etag": - "\"91c297417f4c33cf707148d031e79b6cb316f158\"", "original_email": "su@example.com", - "registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/su@example.com", - "user": "http://localhost:9001/3.0/users/3"}], "http_etag": "\"e9a7c409726b93f93aaf643fce49558cf27237e1\"", - "start": 0, "total_size": 1}'} - headers: - content-length: ['381'] - content-type: [application/json; charset=utf-8] - status: {code: 200, message: OK} + status: {code: 404, message: Not Found} - request: body: null headers: @@ -244,185 +208,11 @@ method: !!python/unicode GET uri: http://localhost:9001/3.0/users/su@example.com response: - body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag": - "\"bb1c2e6094a96b17e2d5dbf487291f7667f69f75\"", "is_server_owner": false, - "self_link": "http://localhost:9001/3.0/users/3", "user_id": 3}'} + body: {string: !!python/unicode 404 Not Found} headers: - content-length: ['188'] + content-length: ['13'] 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/3/addresses - response: - body: {string: !!python/unicode '{"entries": [{"email": "su@example.com", "http_etag": - "\"91c297417f4c33cf707148d031e79b6cb316f158\"", "original_email": "su@example.com", - "registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/su@example.com", - "user": "http://localhost:9001/3.0/users/3"}], "http_etag": "\"e9a7c409726b93f93aaf643fce49558cf27237e1\"", - "start": 0, "total_size": 1}'} - headers: - content-length: ['381'] - content-type: [application/json; charset=utf-8] - status: {code: 200, message: OK} -- request: - body: null - headers: - 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/lists/foo@example.com/config - response: - body: {string: !!python/unicode '{"acceptable_aliases": [], "admin_immed_notify": - true, "admin_notify_mchanges": false, "administrivia": true, "advertised": - true, "allow_list_posts": true, "anonymous_list": false, "archive_policy": - "public", "autorespond_owner": "none", "autorespond_postings": "none", "autorespond_requests": - "none", "autoresponse_grace_period": "90d", "autoresponse_owner_text": "", - "autoresponse_postings_text": "", "autoresponse_request_text": "", "bounces_address": - "foo-bounces@example.com", "collapse_alternatives": true, "convert_html_to_plaintext": - false, "created_at": "2005-08-01T07:49:23", "default_member_action": "defer", - "default_nonmember_action": "hold", "description": "", "digest_last_sent_at": - null, "digest_send_periodic": true, "digest_size_threshold": 30.0, "digest_volume_frequency": - "monthly", "digests_enabled": true, "display_name": "Foo", "filter_content": - false, "first_strip_reply_to": false, "fqdn_listname": "foo@example.com", - "goodbye_message_uri": "", "http_etag": "\"97436ece60591c8bf4b4d589f6b8028a5a2964a3\"", - "include_rfc2369_headers": true, "join_address": "foo-join@example.com", "last_post_at": - null, "leave_address": "foo-leave@example.com", "list_name": "foo", "mail_host": - "example.com", "next_digest_number": 1, "no_reply_address": "noreply@example.com", - "owner_address": "foo-owner@example.com", "post_id": 1, "posting_address": - "foo@example.com", "posting_pipeline": "default-posting-pipeline", "reply_goes_to_list": - "no_munging", "reply_to_address": "", "request_address": "foo-request@example.com", - "scheme": "http", "send_welcome_message": true, "subject_prefix": "[Foo] ", - "subscription_policy": "confirm", "volume": 1, "web_host": "example.com", - "welcome_message_uri": "mailman:///welcome.txt"}'} - headers: - content-length: ['1730'] - 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 '{"created_on": "2005-08-01T07:49:23", "http_etag": - "\"bb1c2e6094a96b17e2d5dbf487291f7667f69f75\"", "is_server_owner": false, - "self_link": "http://localhost:9001/3.0/users/3", "user_id": 3}'} - headers: - 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/3/addresses - response: - body: {string: !!python/unicode '{"entries": [{"email": "su@example.com", "http_etag": - "\"91c297417f4c33cf707148d031e79b6cb316f158\"", "original_email": "su@example.com", - "registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/su@example.com", - "user": "http://localhost:9001/3.0/users/3"}], "http_etag": "\"e9a7c409726b93f93aaf643fce49558cf27237e1\"", - "start": 0, "total_size": 1}'} - headers: - content-length: ['381'] - content-type: [application/json; charset=utf-8] - status: {code: 200, message: OK} -- request: - body: null - headers: - 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/lists/foo@example.com/config - response: - body: {string: !!python/unicode '{"acceptable_aliases": [], "admin_immed_notify": - true, "admin_notify_mchanges": false, "administrivia": true, "advertised": - true, "allow_list_posts": true, "anonymous_list": false, "archive_policy": - "public", "autorespond_owner": "none", "autorespond_postings": "none", "autorespond_requests": - "none", "autoresponse_grace_period": "90d", "autoresponse_owner_text": "", - "autoresponse_postings_text": "", "autoresponse_request_text": "", "bounces_address": - "foo-bounces@example.com", "collapse_alternatives": true, "convert_html_to_plaintext": - false, "created_at": "2005-08-01T07:49:23", "default_member_action": "defer", - "default_nonmember_action": "hold", "description": "", "digest_last_sent_at": - null, "digest_send_periodic": true, "digest_size_threshold": 30.0, "digest_volume_frequency": - "monthly", "digests_enabled": true, "display_name": "Foo", "filter_content": - false, "first_strip_reply_to": false, "fqdn_listname": "foo@example.com", - "goodbye_message_uri": "", "http_etag": "\"97436ece60591c8bf4b4d589f6b8028a5a2964a3\"", - "include_rfc2369_headers": true, "join_address": "foo-join@example.com", "last_post_at": - null, "leave_address": "foo-leave@example.com", "list_name": "foo", "mail_host": - "example.com", "next_digest_number": 1, "no_reply_address": "noreply@example.com", - "owner_address": "foo-owner@example.com", "post_id": 1, "posting_address": - "foo@example.com", "posting_pipeline": "default-posting-pipeline", "reply_goes_to_list": - "no_munging", "reply_to_address": "", "request_address": "foo-request@example.com", - "scheme": "http", "send_welcome_message": true, "subject_prefix": "[Foo] ", - "subscription_policy": "confirm", "volume": 1, "web_host": "example.com", - "welcome_message_uri": "mailman:///welcome.txt"}'} - headers: - content-length: ['1730'] - 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 '{"created_on": "2005-08-01T07:49:23", "http_etag": - "\"bb1c2e6094a96b17e2d5dbf487291f7667f69f75\"", "is_server_owner": false, - "self_link": "http://localhost:9001/3.0/users/3", "user_id": 3}'} - headers: - 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/3/addresses - response: - body: {string: !!python/unicode '{"entries": [{"email": "su@example.com", "http_etag": - "\"91c297417f4c33cf707148d031e79b6cb316f158\"", "original_email": "su@example.com", - "registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/su@example.com", - "user": "http://localhost:9001/3.0/users/3"}], "http_etag": "\"e9a7c409726b93f93aaf643fce49558cf27237e1\"", - "start": 0, "total_size": 1}'} - headers: - content-length: ['381'] - content-type: [application/json; charset=utf-8] - status: {code: 200, message: OK} + status: {code: 404, message: Not Found} - request: body: null headers: @@ -543,29 +333,11 @@ method: !!python/unicode GET uri: http://localhost:9001/3.0/users/su@example.com response: - body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag": - "\"bb1c2e6094a96b17e2d5dbf487291f7667f69f75\"", "is_server_owner": false, - "self_link": "http://localhost:9001/3.0/users/3", "user_id": 3}'} + body: {string: !!python/unicode 404 Not Found} headers: - content-length: ['188'] + content-length: ['13'] 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/3/addresses - response: - body: {string: !!python/unicode '{"entries": [{"email": "su@example.com", "http_etag": - "\"91c297417f4c33cf707148d031e79b6cb316f158\"", "original_email": "su@example.com", - "registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/su@example.com", - "user": "http://localhost:9001/3.0/users/3"}], "http_etag": "\"e9a7c409726b93f93aaf643fce49558cf27237e1\"", - "start": 0, "total_size": 1}'} - headers: - content-length: ['381'] - content-type: [application/json; charset=utf-8] - status: {code: 200, message: OK} + status: {code: 404, message: Not Found} - request: body: null headers: @@ -621,29 +393,11 @@ method: !!python/unicode GET uri: http://localhost:9001/3.0/users/su@example.com response: - body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag": - "\"bb1c2e6094a96b17e2d5dbf487291f7667f69f75\"", "is_server_owner": false, - "self_link": "http://localhost:9001/3.0/users/3", "user_id": 3}'} + body: {string: !!python/unicode 404 Not Found} headers: - content-length: ['188'] + content-length: ['13'] 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/3/addresses - response: - body: {string: !!python/unicode '{"entries": [{"email": "su@example.com", "http_etag": - "\"91c297417f4c33cf707148d031e79b6cb316f158\"", "original_email": "su@example.com", - "registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/su@example.com", - "user": "http://localhost:9001/3.0/users/3"}], "http_etag": "\"e9a7c409726b93f93aaf643fce49558cf27237e1\"", - "start": 0, "total_size": 1}'} - headers: - content-length: ['381'] - content-type: [application/json; charset=utf-8] - status: {code: 200, message: OK} + status: {code: 404, message: Not Found} - request: body: null headers: @@ -696,8 +450,173 @@ 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/lists/foo@example.com/config + response: + body: {string: !!python/unicode '{"acceptable_aliases": [], "admin_immed_notify": + true, "admin_notify_mchanges": false, "administrivia": true, "advertised": + true, "allow_list_posts": true, "anonymous_list": false, "archive_policy": + "public", "autorespond_owner": "none", "autorespond_postings": "none", "autorespond_requests": + "none", "autoresponse_grace_period": "90d", "autoresponse_owner_text": "", + "autoresponse_postings_text": "", "autoresponse_request_text": "", "bounces_address": + "foo-bounces@example.com", "collapse_alternatives": true, "convert_html_to_plaintext": + false, "created_at": "2005-08-01T07:49:23", "default_member_action": "defer", + "default_nonmember_action": "hold", "description": "", "digest_last_sent_at": + null, "digest_send_periodic": true, "digest_size_threshold": 30.0, "digest_volume_frequency": + "monthly", "digests_enabled": true, "display_name": "Foo", "filter_content": + false, "first_strip_reply_to": false, "fqdn_listname": "foo@example.com", + "goodbye_message_uri": "", "http_etag": "\"97436ece60591c8bf4b4d589f6b8028a5a2964a3\"", + "include_rfc2369_headers": true, "join_address": "foo-join@example.com", "last_post_at": + null, "leave_address": "foo-leave@example.com", "list_name": "foo", "mail_host": + "example.com", "next_digest_number": 1, "no_reply_address": "noreply@example.com", + "owner_address": "foo-owner@example.com", "post_id": 1, "posting_address": + "foo@example.com", "posting_pipeline": "default-posting-pipeline", "reply_goes_to_list": + "no_munging", "reply_to_address": "", "request_address": "foo-request@example.com", + "scheme": "http", "send_welcome_message": true, "subject_prefix": "[Foo] ", + "subscription_policy": "confirm", "volume": 1, "web_host": "example.com", + "welcome_message_uri": "mailman:///welcome.txt"}'} + headers: + content-length: ['1730'] + 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": "\"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/lists/foo@example.com/config + response: + body: {string: !!python/unicode '{"acceptable_aliases": [], "admin_immed_notify": + true, "admin_notify_mchanges": false, "administrivia": true, "advertised": + true, "allow_list_posts": true, "anonymous_list": false, "archive_policy": + "public", "autorespond_owner": "none", "autorespond_postings": "none", "autorespond_requests": + "none", "autoresponse_grace_period": "90d", "autoresponse_owner_text": "", + "autoresponse_postings_text": "", "autoresponse_request_text": "", "bounces_address": + "foo-bounces@example.com", "collapse_alternatives": true, "convert_html_to_plaintext": + false, "created_at": "2005-08-01T07:49:23", "default_member_action": "defer", + "default_nonmember_action": "hold", "description": "", "digest_last_sent_at": + null, "digest_send_periodic": true, "digest_size_threshold": 30.0, "digest_volume_frequency": + "monthly", "digests_enabled": true, "display_name": "Foo", "filter_content": + false, "first_strip_reply_to": false, "fqdn_listname": "foo@example.com", + "goodbye_message_uri": "", "http_etag": "\"97436ece60591c8bf4b4d589f6b8028a5a2964a3\"", + "include_rfc2369_headers": true, "join_address": "foo-join@example.com", "last_post_at": + null, "leave_address": "foo-leave@example.com", "list_name": "foo", "mail_host": + "example.com", "next_digest_number": 1, "no_reply_address": "noreply@example.com", + "owner_address": "foo-owner@example.com", "post_id": 1, "posting_address": + "foo@example.com", "posting_pipeline": "default-posting-pipeline", "reply_goes_to_list": + "no_munging", "reply_to_address": "", "request_address": "foo-request@example.com", + "scheme": "http", "send_welcome_message": true, "subject_prefix": "[Foo] ", + "subscription_policy": "confirm", "volume": 1, "web_host": "example.com", + "welcome_message_uri": "mailman:///welcome.txt"}'} + headers: + content-length: ['1730'] + 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/domains + response: + body: {string: !!python/unicode '{"entries": [{"base_url": "http://example.com", + "description": null, "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", + "mail_host": "example.com", "self_link": "http://localhost:9001/3.0/domains/example.com", + "url_host": "example.com"}], "http_etag": "\"c385b155f8da284bf78dbe075e20f58a30c893ab\"", + "start": 0, "total_size": 1}'} + headers: + content-length: ['338'] + content-type: [application/json; charset=utf-8] + status: {code: 200, message: OK} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] method: !!python/unicode DELETE - uri: http://localhost:9001/3.0/lists/foo@example.com + uri: http://localhost:9001/3.0/domains/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 + response: + body: {string: !!python/unicode '{"entries": [{"created_on": "2005-08-01T07:49:23", + "http_etag": "\"33391283e97aba9adb14b967d9f9f20b9c753a07\"", "is_server_owner": + false, "self_link": "http://localhost:9001/3.0/users/76", "user_id": 76}, + {"created_on": "2005-08-01T07:49:23", "http_etag": "\"f4726ea3c1b9f16f9d77ed155a404620fca4fb69\"", + "is_server_owner": false, "self_link": "http://localhost:9001/3.0/users/77", + "user_id": 77}], "http_etag": "\"3b024222bcc8e89958b1a3c6ccf92608063c8e5a\"", + "start": 0, "total_size": 2}'} + headers: + content-length: ['487'] + 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/76 response: body: {string: !!python/unicode ''} headers: @@ -708,7 +627,7 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode DELETE - uri: http://localhost:9001/3.0/domains/example.com + uri: http://localhost:9001/3.0/users/77 response: body: {string: !!python/unicode ''} headers: diff --git a/src/postorius/tests/fixtures/vcr_cassettes/ListSettingsTest.test_page_not_accessible_for_unprivileged_users.yaml b/src/postorius/tests/fixtures/vcr_cassettes/ListSettingsTest.test_page_not_accessible_for_unprivileged_users.yaml index 70269ef..1bfefe4 100644 --- a/src/postorius/tests/fixtures/vcr_cassettes/ListSettingsTest.test_page_not_accessible_for_unprivileged_users.yaml +++ b/src/postorius/tests/fixtures/vcr_cassettes/ListSettingsTest.test_page_not_accessible_for_unprivileged_users.yaml @@ -116,13 +116,13 @@ 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": "\"0cba98958250da264a0b8614b60291a14f01cf5d\"", + "delivery_mode": "regular", "email": "owner@example.com", "http_etag": "\"4934fdbfa14cc02c828354fce1f0f26cabaeb08a\"", "list_id": "foo.example.com", "member_id": 79, "moderation_action": "accept", "role": "owner", "self_link": "http://localhost:9001/3.0/members/79", "user": - "http://localhost:9001/3.0/users/6"}], "http_etag": "\"c49d6d1744c0a487a2baeedeec361dc6cf6081f7\"", + "http://localhost:9001/3.0/users/78"}], "http_etag": "\"b58df74fa2e4901acaac5bd65c651d5079719db5\"", "start": 0, "total_size": 1}'} headers: - content-length: ['485'] + content-length: ['486'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -134,13 +134,13 @@ 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": - "\"9e8f77709462430a22180a6eb4a4a8a2bf713df3\"", "list_id": "foo.example.com", + "\"dd6fb509699e3aec91738c14a707a7c5beda534a\"", "list_id": "foo.example.com", "member_id": 80, "moderation_action": "accept", "role": "moderator", "self_link": - "http://localhost:9001/3.0/members/80", "user": "http://localhost:9001/3.0/users/7"}], - "http_etag": "\"564580a36ae5e0650f366c3ef0baf1cb6233e5ec\"", "start": 0, "total_size": + "http://localhost:9001/3.0/members/80", "user": "http://localhost:9001/3.0/users/79"}], + "http_etag": "\"fcc9c7ca23a2257a4023f9fc65c7a204d04cdf39\"", "start": 0, "total_size": 1}'} headers: - content-length: ['497'] + content-length: ['498'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -178,13 +178,13 @@ 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": "\"0cba98958250da264a0b8614b60291a14f01cf5d\"", + "delivery_mode": "regular", "email": "owner@example.com", "http_etag": "\"4934fdbfa14cc02c828354fce1f0f26cabaeb08a\"", "list_id": "foo.example.com", "member_id": 79, "moderation_action": "accept", "role": "owner", "self_link": "http://localhost:9001/3.0/members/79", "user": - "http://localhost:9001/3.0/users/6"}], "http_etag": "\"c49d6d1744c0a487a2baeedeec361dc6cf6081f7\"", + "http://localhost:9001/3.0/users/78"}], "http_etag": "\"b58df74fa2e4901acaac5bd65c651d5079719db5\"", "start": 0, "total_size": 1}'} headers: - content-length: ['485'] + content-length: ['486'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -196,13 +196,13 @@ 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": - "\"9e8f77709462430a22180a6eb4a4a8a2bf713df3\"", "list_id": "foo.example.com", + "\"dd6fb509699e3aec91738c14a707a7c5beda534a\"", "list_id": "foo.example.com", "member_id": 80, "moderation_action": "accept", "role": "moderator", "self_link": - "http://localhost:9001/3.0/members/80", "user": "http://localhost:9001/3.0/users/7"}], - "http_etag": "\"564580a36ae5e0650f366c3ef0baf1cb6233e5ec\"", "start": 0, "total_size": + "http://localhost:9001/3.0/members/80", "user": "http://localhost:9001/3.0/users/79"}], + "http_etag": "\"fcc9c7ca23a2257a4023f9fc65c7a204d04cdf39\"", "start": 0, "total_size": 1}'} headers: - content-length: ['497'] + content-length: ['498'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -240,13 +240,13 @@ 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": "\"0cba98958250da264a0b8614b60291a14f01cf5d\"", + "delivery_mode": "regular", "email": "owner@example.com", "http_etag": "\"4934fdbfa14cc02c828354fce1f0f26cabaeb08a\"", "list_id": "foo.example.com", "member_id": 79, "moderation_action": "accept", "role": "owner", "self_link": "http://localhost:9001/3.0/members/79", "user": - "http://localhost:9001/3.0/users/6"}], "http_etag": "\"c49d6d1744c0a487a2baeedeec361dc6cf6081f7\"", + "http://localhost:9001/3.0/users/78"}], "http_etag": "\"b58df74fa2e4901acaac5bd65c651d5079719db5\"", "start": 0, "total_size": 1}'} headers: - content-length: ['485'] + content-length: ['486'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -258,13 +258,13 @@ 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": - "\"9e8f77709462430a22180a6eb4a4a8a2bf713df3\"", "list_id": "foo.example.com", + "\"dd6fb509699e3aec91738c14a707a7c5beda534a\"", "list_id": "foo.example.com", "member_id": 80, "moderation_action": "accept", "role": "moderator", "self_link": - "http://localhost:9001/3.0/members/80", "user": "http://localhost:9001/3.0/users/7"}], - "http_etag": "\"564580a36ae5e0650f366c3ef0baf1cb6233e5ec\"", "start": 0, "total_size": + "http://localhost:9001/3.0/members/80", "user": "http://localhost:9001/3.0/users/79"}], + "http_etag": "\"fcc9c7ca23a2257a4023f9fc65c7a204d04cdf39\"", "start": 0, "total_size": 1}'} headers: - content-length: ['497'] + content-length: ['498'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -302,13 +302,13 @@ 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": "\"0cba98958250da264a0b8614b60291a14f01cf5d\"", + "delivery_mode": "regular", "email": "owner@example.com", "http_etag": "\"4934fdbfa14cc02c828354fce1f0f26cabaeb08a\"", "list_id": "foo.example.com", "member_id": 79, "moderation_action": "accept", "role": "owner", "self_link": "http://localhost:9001/3.0/members/79", "user": - "http://localhost:9001/3.0/users/6"}], "http_etag": "\"c49d6d1744c0a487a2baeedeec361dc6cf6081f7\"", + "http://localhost:9001/3.0/users/78"}], "http_etag": "\"b58df74fa2e4901acaac5bd65c651d5079719db5\"", "start": 0, "total_size": 1}'} headers: - content-length: ['485'] + content-length: ['486'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -320,13 +320,13 @@ 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": - "\"9e8f77709462430a22180a6eb4a4a8a2bf713df3\"", "list_id": "foo.example.com", + "\"dd6fb509699e3aec91738c14a707a7c5beda534a\"", "list_id": "foo.example.com", "member_id": 80, "moderation_action": "accept", "role": "moderator", "self_link": - "http://localhost:9001/3.0/members/80", "user": "http://localhost:9001/3.0/users/7"}], - "http_etag": "\"564580a36ae5e0650f366c3ef0baf1cb6233e5ec\"", "start": 0, "total_size": + "http://localhost:9001/3.0/members/80", "user": "http://localhost:9001/3.0/users/79"}], + "http_etag": "\"fcc9c7ca23a2257a4023f9fc65c7a204d04cdf39\"", "start": 0, "total_size": 1}'} headers: - content-length: ['497'] + content-length: ['498'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -364,13 +364,13 @@ 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": "\"0cba98958250da264a0b8614b60291a14f01cf5d\"", + "delivery_mode": "regular", "email": "owner@example.com", "http_etag": "\"4934fdbfa14cc02c828354fce1f0f26cabaeb08a\"", "list_id": "foo.example.com", "member_id": 79, "moderation_action": "accept", "role": "owner", "self_link": "http://localhost:9001/3.0/members/79", "user": - "http://localhost:9001/3.0/users/6"}], "http_etag": "\"c49d6d1744c0a487a2baeedeec361dc6cf6081f7\"", + "http://localhost:9001/3.0/users/78"}], "http_etag": "\"b58df74fa2e4901acaac5bd65c651d5079719db5\"", "start": 0, "total_size": 1}'} headers: - content-length: ['485'] + content-length: ['486'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -382,13 +382,13 @@ 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": - "\"9e8f77709462430a22180a6eb4a4a8a2bf713df3\"", "list_id": "foo.example.com", + "\"dd6fb509699e3aec91738c14a707a7c5beda534a\"", "list_id": "foo.example.com", "member_id": 80, "moderation_action": "accept", "role": "moderator", "self_link": - "http://localhost:9001/3.0/members/80", "user": "http://localhost:9001/3.0/users/7"}], - "http_etag": "\"564580a36ae5e0650f366c3ef0baf1cb6233e5ec\"", "start": 0, "total_size": + "http://localhost:9001/3.0/members/80", "user": "http://localhost:9001/3.0/users/79"}], + "http_etag": "\"fcc9c7ca23a2257a4023f9fc65c7a204d04cdf39\"", "start": 0, "total_size": 1}'} headers: - content-length: ['497'] + content-length: ['498'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -426,13 +426,13 @@ 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": "\"0cba98958250da264a0b8614b60291a14f01cf5d\"", + "delivery_mode": "regular", "email": "owner@example.com", "http_etag": "\"4934fdbfa14cc02c828354fce1f0f26cabaeb08a\"", "list_id": "foo.example.com", "member_id": 79, "moderation_action": "accept", "role": "owner", "self_link": "http://localhost:9001/3.0/members/79", "user": - "http://localhost:9001/3.0/users/6"}], "http_etag": "\"c49d6d1744c0a487a2baeedeec361dc6cf6081f7\"", + "http://localhost:9001/3.0/users/78"}], "http_etag": "\"b58df74fa2e4901acaac5bd65c651d5079719db5\"", "start": 0, "total_size": 1}'} headers: - content-length: ['485'] + content-length: ['486'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -444,13 +444,13 @@ 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": - "\"9e8f77709462430a22180a6eb4a4a8a2bf713df3\"", "list_id": "foo.example.com", + "\"dd6fb509699e3aec91738c14a707a7c5beda534a\"", "list_id": "foo.example.com", "member_id": 80, "moderation_action": "accept", "role": "moderator", "self_link": - "http://localhost:9001/3.0/members/80", "user": "http://localhost:9001/3.0/users/7"}], - "http_etag": "\"564580a36ae5e0650f366c3ef0baf1cb6233e5ec\"", "start": 0, "total_size": + "http://localhost:9001/3.0/members/80", "user": "http://localhost:9001/3.0/users/79"}], + "http_etag": "\"fcc9c7ca23a2257a4023f9fc65c7a204d04cdf39\"", "start": 0, "total_size": 1}'} headers: - content-length: ['497'] + content-length: ['498'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -488,13 +488,13 @@ 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": "\"0cba98958250da264a0b8614b60291a14f01cf5d\"", + "delivery_mode": "regular", "email": "owner@example.com", "http_etag": "\"4934fdbfa14cc02c828354fce1f0f26cabaeb08a\"", "list_id": "foo.example.com", "member_id": 79, "moderation_action": "accept", "role": "owner", "self_link": "http://localhost:9001/3.0/members/79", "user": - "http://localhost:9001/3.0/users/6"}], "http_etag": "\"c49d6d1744c0a487a2baeedeec361dc6cf6081f7\"", + "http://localhost:9001/3.0/users/78"}], "http_etag": "\"b58df74fa2e4901acaac5bd65c651d5079719db5\"", "start": 0, "total_size": 1}'} headers: - content-length: ['485'] + content-length: ['486'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -506,13 +506,29 @@ 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": - "\"9e8f77709462430a22180a6eb4a4a8a2bf713df3\"", "list_id": "foo.example.com", + "\"dd6fb509699e3aec91738c14a707a7c5beda534a\"", "list_id": "foo.example.com", "member_id": 80, "moderation_action": "accept", "role": "moderator", "self_link": - "http://localhost:9001/3.0/members/80", "user": "http://localhost:9001/3.0/users/7"}], - "http_etag": "\"564580a36ae5e0650f366c3ef0baf1cb6233e5ec\"", "start": 0, "total_size": + "http://localhost:9001/3.0/members/80", "user": "http://localhost:9001/3.0/users/79"}], + "http_etag": "\"fcc9c7ca23a2257a4023f9fc65c7a204d04cdf39\"", "start": 0, "total_size": 1}'} headers: - content-length: ['497'] + content-length: ['498'] + 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/domains + response: + body: {string: !!python/unicode '{"entries": [{"base_url": "http://example.com", + "description": null, "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", + "mail_host": "example.com", "self_link": "http://localhost:9001/3.0/domains/example.com", + "url_host": "example.com"}], "http_etag": "\"c385b155f8da284bf78dbe075e20f58a30c893ab\"", + "start": 0, "total_size": 1}'} + headers: + content-length: ['338'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -520,7 +536,36 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode DELETE - uri: http://localhost:9001/3.0/lists/foo@example.com + uri: http://localhost:9001/3.0/domains/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 + response: + body: {string: !!python/unicode '{"entries": [{"created_on": "2005-08-01T07:49:23", + "http_etag": "\"48e69a69c5400d681e4c434b7c52d712eb2d1e67\"", "is_server_owner": + false, "self_link": "http://localhost:9001/3.0/users/78", "user_id": 78}, + {"created_on": "2005-08-01T07:49:23", "http_etag": "\"1893973f238810e437cd3233b04ee5c1ab23022c\"", + "is_server_owner": false, "self_link": "http://localhost:9001/3.0/users/79", + "user_id": 79}], "http_etag": "\"0d67cbec8275319f2d218473c1aec437a9b7641e\"", + "start": 0, "total_size": 2}'} + headers: + content-length: ['487'] + 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/78 response: body: {string: !!python/unicode ''} headers: @@ -531,7 +576,7 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode DELETE - uri: http://localhost:9001/3.0/domains/example.com + uri: http://localhost:9001/3.0/users/79 response: body: {string: !!python/unicode ''} headers: diff --git a/src/postorius/tests/fixtures/vcr_cassettes/ListSettingsTest.test_page_not_accessible_if_not_logged_in.yaml b/src/postorius/tests/fixtures/vcr_cassettes/ListSettingsTest.test_page_not_accessible_if_not_logged_in.yaml index 3011c9b..c2e37ba 100644 --- a/src/postorius/tests/fixtures/vcr_cassettes/ListSettingsTest.test_page_not_accessible_if_not_logged_in.yaml +++ b/src/postorius/tests/fixtures/vcr_cassettes/ListSettingsTest.test_page_not_accessible_if_not_logged_in.yaml @@ -85,8 +85,53 @@ body: null headers: accept-encoding: ['gzip, deflate'] + method: !!python/unicode GET + uri: http://localhost:9001/3.0/domains + response: + body: {string: !!python/unicode '{"entries": [{"base_url": "http://example.com", + "description": null, "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", + "mail_host": "example.com", "self_link": "http://localhost:9001/3.0/domains/example.com", + "url_host": "example.com"}], "http_etag": "\"c385b155f8da284bf78dbe075e20f58a30c893ab\"", + "start": 0, "total_size": 1}'} + headers: + content-length: ['338'] + content-type: [application/json; charset=utf-8] + status: {code: 200, message: OK} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] method: !!python/unicode DELETE - uri: http://localhost:9001/3.0/lists/foo@example.com + uri: http://localhost:9001/3.0/domains/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 + response: + body: {string: !!python/unicode '{"entries": [{"created_on": "2005-08-01T07:49:23", + "http_etag": "\"3cfc8052df45dbd51a138a5b79c02833187f6536\"", "is_server_owner": + false, "self_link": "http://localhost:9001/3.0/users/80", "user_id": 80}, + {"created_on": "2005-08-01T07:49:23", "http_etag": "\"889bb0e6564a61b50ebbaeff64fa24f8ad504620\"", + "is_server_owner": false, "self_link": "http://localhost:9001/3.0/users/81", + "user_id": 81}], "http_etag": "\"96011b3b5bdb59441b6904ae40a1ed9ea8f479f5\"", + "start": 0, "total_size": 2}'} + headers: + content-length: ['487'] + 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/80 response: body: {string: !!python/unicode ''} headers: @@ -97,7 +142,7 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode DELETE - uri: http://localhost:9001/3.0/domains/example.com + uri: http://localhost:9001/3.0/users/81 response: body: {string: !!python/unicode ''} headers: diff --git a/src/postorius/tests/fixtures/vcr_cassettes/ListSummaryPageTest.test_list_metrics_displayed_to_owner.yaml b/src/postorius/tests/fixtures/vcr_cassettes/ListSummaryPageTest.test_list_metrics_displayed_to_owner.yaml index 14c7336..8974855 100644 --- a/src/postorius/tests/fixtures/vcr_cassettes/ListSummaryPageTest.test_list_metrics_displayed_to_owner.yaml +++ b/src/postorius/tests/fixtures/vcr_cassettes/ListSummaryPageTest.test_list_metrics_displayed_to_owner.yaml @@ -76,8 +76,8 @@ uri: http://localhost:9001/3.0/users/test@example.com response: body: {string: !!python/unicode '{"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}'} + "\"8286cc98937375102d07528f8b097f299b24d85e\"", "is_server_owner": false, + "self_link": "http://localhost:9001/3.0/users/89", "user_id": 89}'} headers: content-length: ['190'] content-type: [application/json; charset=utf-8] @@ -87,12 +87,12 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode GET - uri: http://localhost:9001/3.0/users/17/addresses + uri: http://localhost:9001/3.0/users/89/addresses response: body: {string: !!python/unicode '{"entries": [{"email": "test@example.com", "http_etag": - "\"728b0a651f28a9aef0690432eb539012aa4c130d\"", "original_email": "test@example.com", + "\"920393efa9dc1cf2983c83528eb739de9a07ab92\"", "original_email": "test@example.com", "registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/test@example.com", - "user": "http://localhost:9001/3.0/users/17"}], "http_etag": "\"88559b648e3cb3ad6fbc75e13dbd37b318e5aa20\"", + "user": "http://localhost:9001/3.0/users/89"}], "http_etag": "\"85922ebb67afcfc928f7f6d71dd8a35321d24bc9\"", "start": 0, "total_size": 1}'} headers: content-length: ['388'] @@ -121,10 +121,10 @@ 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/test@example.com", - "delivery_mode": "regular", "email": "test@example.com", "http_etag": "\"94c2138a69c3ca4cd854383d25656312e5018629\"", + "delivery_mode": "regular", "email": "test@example.com", "http_etag": "\"7ebde67c28dc03d47019647e2f384128ecb10a6e\"", "list_id": "foo.example.com", "member_id": 84, "moderation_action": "accept", "role": "owner", "self_link": "http://localhost:9001/3.0/members/84", "user": - "http://localhost:9001/3.0/users/17"}], "http_etag": "\"8456d88e785528dee669a598709c3b6825bb64cf\"", + "http://localhost:9001/3.0/users/89"}], "http_etag": "\"563d79ec6cf2fced22174a41d9306d3e5b720d1a\"", "start": 0, "total_size": 1}'} headers: content-length: ['484'] @@ -193,16 +193,15 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode GET - uri: http://localhost:9001/3.0/lists + uri: http://localhost:9001/3.0/domains response: - body: {string: !!python/unicode '{"entries": [{"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}], "http_etag": "\"0eb6d0b88c89b5c491b7966eab97a79e221096ad\"", + body: {string: !!python/unicode '{"entries": [{"base_url": "http://example.com", + "description": null, "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", + "mail_host": "example.com", "self_link": "http://localhost:9001/3.0/domains/example.com", + "url_host": "example.com"}], "http_etag": "\"c385b155f8da284bf78dbe075e20f58a30c893ab\"", "start": 0, "total_size": 1}'} headers: - content-length: ['399'] + content-length: ['338'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -210,7 +209,7 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode DELETE - uri: http://localhost:9001/3.0/lists/foo@example.com + uri: http://localhost:9001/3.0/domains/example.com response: body: {string: !!python/unicode ''} headers: @@ -224,35 +223,12 @@ uri: http://localhost:9001/3.0/users response: body: {string: !!python/unicode '{"entries": [{"created_on": "2005-08-01T07:49:23", - "http_etag": "\"f0b94bf2edd58e88d678043b4b49362ca377722e\"", "is_server_owner": - false, "password": "$6$rounds=690702$ldltgxeeAosAEu84$ypRhGVnPjh7q/JCzASdnPfc9C2lytW2mFFbTOfncE93GP9pETx6Z.Jra2.ERfCF.v/bueX6J6vvU8rWR9sCDk/", - "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}, {"created_on": "2005-08-01T07:49:23", "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}, {"created_on": "2005-08-01T07:49:23", "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}, {"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", "display_name": "None", - "http_etag": "\"d81849243b31142274eec6832eafa6b6cef34829\"", "is_server_owner": - false, "self_link": "http://localhost:9001/3.0/users/8", "user_id": 8}, {"created_on": - "2005-08-01T07:49:23", "display_name": "None", "http_etag": "\"59a05d273f9b6592645e3346c27b5d30f85b1a3a\"", - "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": "\"df1da5b04076c5742af3a45b43556e1e65edf5b5\"", - "is_server_owner": false, "password": "$6$rounds=594149$iGGXb1VEgzLDhh4x$.LV0R92nkWZ4wJwno0HGVPpwAQARAb21jlEJSNG/WySi6rGJySJBAx5Iazjg993wAZ8TVrKOWisE8ecPRrvXL/", - "self_link": "http://localhost:9001/3.0/users/15", "user_id": 15}, {"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": "\"b5eec0aa09436f1d56c90b7118d81cb9143db2e8\"", - "start": 0, "total_size": 11}'} + "http_etag": "\"8286cc98937375102d07528f8b097f299b24d85e\"", "is_server_owner": + false, "self_link": "http://localhost:9001/3.0/users/89", "user_id": 89}], + "http_etag": "\"c963239b96a234fc3458f2e3a66317613f8d9ef1\"", "start": 0, "total_size": + 1}'} headers: - content-length: ['2518'] + content-length: ['295'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -260,128 +236,7 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode DELETE - uri: http://localhost:9001/3.0/users/1 - 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/15 - 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/17 - 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/2 - 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/3 - 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/4 - 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/5 - 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 - 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/domains/example.com + uri: http://localhost:9001/3.0/users/89 response: body: {string: !!python/unicode ''} headers: diff --git a/src/postorius/tests/fixtures/vcr_cassettes/ListSummaryPageTest.test_list_metrics_displayed_to_superuser.yaml b/src/postorius/tests/fixtures/vcr_cassettes/ListSummaryPageTest.test_list_metrics_displayed_to_superuser.yaml index dd70cf0..83b036f 100644 --- a/src/postorius/tests/fixtures/vcr_cassettes/ListSummaryPageTest.test_list_metrics_displayed_to_superuser.yaml +++ b/src/postorius/tests/fixtures/vcr_cassettes/ListSummaryPageTest.test_list_metrics_displayed_to_superuser.yaml @@ -143,16 +143,15 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode GET - uri: http://localhost:9001/3.0/lists + uri: http://localhost:9001/3.0/domains response: - body: {string: !!python/unicode '{"entries": [{"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}], "http_etag": "\"0eb6d0b88c89b5c491b7966eab97a79e221096ad\"", + body: {string: !!python/unicode '{"entries": [{"base_url": "http://example.com", + "description": null, "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", + "mail_host": "example.com", "self_link": "http://localhost:9001/3.0/domains/example.com", + "url_host": "example.com"}], "http_etag": "\"c385b155f8da284bf78dbe075e20f58a30c893ab\"", "start": 0, "total_size": 1}'} headers: - content-length: ['399'] + content-length: ['338'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -160,7 +159,7 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode DELETE - uri: http://localhost:9001/3.0/lists/foo@example.com + uri: http://localhost:9001/3.0/domains/example.com response: body: {string: !!python/unicode ''} headers: @@ -179,15 +178,4 @@ content-length: ['90'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} -- request: - body: null - headers: - accept-encoding: ['gzip, deflate'] - method: !!python/unicode DELETE - uri: http://localhost:9001/3.0/domains/example.com - response: - body: {string: !!python/unicode ''} - headers: - content-length: ['0'] - status: {code: 204, message: No Content} version: 1 diff --git a/src/postorius/tests/fixtures/vcr_cassettes/ListSummaryPageTest.test_list_metrics_not_displayed_to_moderator.yaml b/src/postorius/tests/fixtures/vcr_cassettes/ListSummaryPageTest.test_list_metrics_not_displayed_to_moderator.yaml index d3f21ae..34b5f26 100644 --- a/src/postorius/tests/fixtures/vcr_cassettes/ListSummaryPageTest.test_list_metrics_not_displayed_to_moderator.yaml +++ b/src/postorius/tests/fixtures/vcr_cassettes/ListSummaryPageTest.test_list_metrics_not_displayed_to_moderator.yaml @@ -76,8 +76,8 @@ uri: http://localhost:9001/3.0/users/test@example.com response: body: {string: !!python/unicode '{"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}'} + "\"e57fa6a0774d564e77f4ab20200cc454e731f4f3\"", "is_server_owner": false, + "self_link": "http://localhost:9001/3.0/users/90", "user_id": 90}'} headers: content-length: ['190'] content-type: [application/json; charset=utf-8] @@ -87,12 +87,12 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode GET - uri: http://localhost:9001/3.0/users/18/addresses + uri: http://localhost:9001/3.0/users/90/addresses response: body: {string: !!python/unicode '{"entries": [{"email": "test@example.com", "http_etag": - "\"c15852aab181b68acbd442056b76d5dd8a6daa16\"", "original_email": "test@example.com", + "\"6dfac99c9d645aa968f16e0f939af17a87294175\"", "original_email": "test@example.com", "registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/test@example.com", - "user": "http://localhost:9001/3.0/users/18"}], "http_etag": "\"8cf4f4b24629be22ab8c1244fb152274d892955f\"", + "user": "http://localhost:9001/3.0/users/90"}], "http_etag": "\"ddbbc355358c643cc536ed7be783d49c33a061c6\"", "start": 0, "total_size": 1}'} headers: content-length: ['388'] @@ -134,10 +134,10 @@ uri: http://localhost:9001/3.0/lists/foo.example.com/roster/moderator response: body: {string: !!python/unicode '{"entries": [{"address": "http://localhost:9001/3.0/addresses/test@example.com", - "delivery_mode": "regular", "email": "test@example.com", "http_etag": "\"642646e754f74dbd062a4e23fe860e6e20529826\"", + "delivery_mode": "regular", "email": "test@example.com", "http_etag": "\"f71db8babafdd13ca18e5fc81ce60d93cc64fbfa\"", "list_id": "foo.example.com", "member_id": 85, "moderation_action": "accept", "role": "moderator", "self_link": "http://localhost:9001/3.0/members/85", - "user": "http://localhost:9001/3.0/users/18"}], "http_etag": "\"7f01a35c78753b97fcb5c44d01755b4fc9659f11\"", + "user": "http://localhost:9001/3.0/users/90"}], "http_etag": "\"3744a14e11715524253b329f6e960b3d1218e73b\"", "start": 0, "total_size": 1}'} headers: content-length: ['488'] @@ -193,16 +193,15 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode GET - uri: http://localhost:9001/3.0/lists + uri: http://localhost:9001/3.0/domains response: - body: {string: !!python/unicode '{"entries": [{"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}], "http_etag": "\"0eb6d0b88c89b5c491b7966eab97a79e221096ad\"", + body: {string: !!python/unicode '{"entries": [{"base_url": "http://example.com", + "description": null, "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", + "mail_host": "example.com", "self_link": "http://localhost:9001/3.0/domains/example.com", + "url_host": "example.com"}], "http_etag": "\"c385b155f8da284bf78dbe075e20f58a30c893ab\"", "start": 0, "total_size": 1}'} headers: - content-length: ['399'] + content-length: ['338'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -210,7 +209,7 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode DELETE - uri: http://localhost:9001/3.0/lists/foo@example.com + uri: http://localhost:9001/3.0/domains/example.com response: body: {string: !!python/unicode ''} headers: @@ -224,9 +223,9 @@ 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}], - "http_etag": "\"2a6ff34a4bc6156b829eb1099b7769ad58a05035\"", "start": 0, "total_size": + "http_etag": "\"e57fa6a0774d564e77f4ab20200cc454e731f4f3\"", "is_server_owner": + false, "self_link": "http://localhost:9001/3.0/users/90", "user_id": 90}], + "http_etag": "\"daff959c066d48f7fc2813b326c5ccc1d5234e4b\"", "start": 0, "total_size": 1}'} headers: content-length: ['295'] @@ -237,18 +236,7 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode DELETE - uri: http://localhost:9001/3.0/users/18 - 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/domains/example.com + uri: http://localhost:9001/3.0/users/90 response: body: {string: !!python/unicode ''} headers: diff --git a/src/postorius/tests/fixtures/vcr_cassettes/ListSummaryPageTest.test_list_summary_is_admin_secondary_moderator.yaml b/src/postorius/tests/fixtures/vcr_cassettes/ListSummaryPageTest.test_list_summary_is_admin_secondary_moderator.yaml index 8f3126d..f756855 100644 --- a/src/postorius/tests/fixtures/vcr_cassettes/ListSummaryPageTest.test_list_summary_is_admin_secondary_moderator.yaml +++ b/src/postorius/tests/fixtures/vcr_cassettes/ListSummaryPageTest.test_list_summary_is_admin_secondary_moderator.yaml @@ -51,7 +51,7 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - location: ['http://localhost:9001/3.0/users/19'] + location: ['http://localhost:9001/3.0/users/91'] status: {code: 201, message: Created} - request: body: email=anotheremail%40example.com @@ -59,7 +59,7 @@ accept-encoding: ['gzip, deflate'] !!python/unicode content-type: [!!python/unicode application/x-www-form-urlencoded] method: !!python/unicode POST - uri: http://localhost:9001/3.0/users/19/addresses + uri: http://localhost:9001/3.0/users/91/addresses response: body: {string: !!python/unicode ''} headers: @@ -113,9 +113,9 @@ uri: http://localhost:9001/3.0/users/test@example.com response: body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag": - "\"00c4a5351ec250b939a8ca62548e24ad07eb9525\"", "is_server_owner": false, - "password": "$6$rounds=715641$InbErd/F/iQ/fr7X$qxzR5wYx3NGuC.BItffVt7D6SeDZAZm2C143tPDfCWHmrOXPtcoC70fOt09a3F/AWihTujdY5CaP3nmv3kKuT.", - "self_link": "http://localhost:9001/3.0/users/19", "user_id": 19}'} + "\"bbd8193e721e99efbe4adce8bd09bf53efe2787e\"", "is_server_owner": false, + "password": "$6$rounds=624379$Fth6VYg.OdXWi0L.$unmPtt8T6ryixFa/dssHb1EaOzInP8p4P9Qczd9GSiOSq.cThqbt9weXr9HmisIB6U1CD8LJLk1DX16NCbM5r1", + "self_link": "http://localhost:9001/3.0/users/91", "user_id": 91}'} headers: content-length: ['326'] content-type: [application/json; charset=utf-8] @@ -125,16 +125,16 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode GET - uri: http://localhost:9001/3.0/users/19/addresses + uri: http://localhost:9001/3.0/users/91/addresses response: body: {string: !!python/unicode '{"entries": [{"email": "anotheremail@example.com", - "http_etag": "\"f9869a7a3dd79521370b25fccfc997d4d91b122d\"", "original_email": + "http_etag": "\"6d35a814b1e88eac99f7bd46c13dc3be77f51515\"", "original_email": "anotheremail@example.com", "registered_on": "2005-08-01T07:49:23", "self_link": - "http://localhost:9001/3.0/addresses/anotheremail@example.com", "user": "http://localhost:9001/3.0/users/19", + "http://localhost:9001/3.0/addresses/anotheremail@example.com", "user": "http://localhost:9001/3.0/users/91", "verified_on": "2005-08-01T07:49:23"}, {"email": "test@example.com", "http_etag": - "\"1a715f7fa744bfe479dc6c77790a2b359b4af543\"", "original_email": "test@example.com", + "\"aea469ee00acc86366027dc1eed8b57a0c1a233c\"", "original_email": "test@example.com", "registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/test@example.com", - "user": "http://localhost:9001/3.0/users/19"}], "http_etag": "\"587ce4683d18eb1ec14e5fd480c0f8e525560dc7\"", + "user": "http://localhost:9001/3.0/users/91"}], "http_etag": "\"515f8bbacf5be76115b727bdced7e87b5a4bf7f7\"", "start": 0, "total_size": 2}'} headers: content-length: ['735'] @@ -177,10 +177,10 @@ response: body: {string: !!python/unicode '{"entries": [{"address": "http://localhost:9001/3.0/addresses/anotheremail@example.com", "delivery_mode": "regular", "email": "anotheremail@example.com", "http_etag": - "\"32eee5c1d6673a44171c5f820c01e91ff0d84e6f\"", "list_id": "foo.example.com", + "\"13d2637434a396802046f36c3a85152a65b0cf1b\"", "list_id": "foo.example.com", "member_id": 86, "moderation_action": "accept", "role": "moderator", "self_link": - "http://localhost:9001/3.0/members/86", "user": "http://localhost:9001/3.0/users/19"}], - "http_etag": "\"5139cc00d1b6e20a26bc394d93676ddcb70da453\"", "start": 0, "total_size": + "http://localhost:9001/3.0/members/86", "user": "http://localhost:9001/3.0/users/91"}], + "http_etag": "\"bc28d63fadbbe78211981b115494db9f71da0ddc\"", "start": 0, "total_size": 1}'} headers: content-length: ['504'] @@ -248,16 +248,15 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode GET - uri: http://localhost:9001/3.0/lists + uri: http://localhost:9001/3.0/domains response: - body: {string: !!python/unicode '{"entries": [{"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}], "http_etag": "\"0eb6d0b88c89b5c491b7966eab97a79e221096ad\"", + body: {string: !!python/unicode '{"entries": [{"base_url": "http://example.com", + "description": null, "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", + "mail_host": "example.com", "self_link": "http://localhost:9001/3.0/domains/example.com", + "url_host": "example.com"}], "http_etag": "\"c385b155f8da284bf78dbe075e20f58a30c893ab\"", "start": 0, "total_size": 1}'} headers: - content-length: ['399'] + content-length: ['338'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -265,7 +264,7 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode DELETE - uri: http://localhost:9001/3.0/lists/foo@example.com + uri: http://localhost:9001/3.0/domains/example.com response: body: {string: !!python/unicode ''} headers: @@ -279,10 +278,10 @@ uri: http://localhost:9001/3.0/users response: body: {string: !!python/unicode '{"entries": [{"created_on": "2005-08-01T07:49:23", - "http_etag": "\"00c4a5351ec250b939a8ca62548e24ad07eb9525\"", "is_server_owner": - false, "password": "$6$rounds=715641$InbErd/F/iQ/fr7X$qxzR5wYx3NGuC.BItffVt7D6SeDZAZm2C143tPDfCWHmrOXPtcoC70fOt09a3F/AWihTujdY5CaP3nmv3kKuT.", - "self_link": "http://localhost:9001/3.0/users/19", "user_id": 19}], "http_etag": - "\"68a21dcfda24442856a7abc2e6aabd1a62408a5c\"", "start": 0, "total_size": + "http_etag": "\"bbd8193e721e99efbe4adce8bd09bf53efe2787e\"", "is_server_owner": + false, "password": "$6$rounds=624379$Fth6VYg.OdXWi0L.$unmPtt8T6ryixFa/dssHb1EaOzInP8p4P9Qczd9GSiOSq.cThqbt9weXr9HmisIB6U1CD8LJLk1DX16NCbM5r1", + "self_link": "http://localhost:9001/3.0/users/91", "user_id": 91}], "http_etag": + "\"a7f9fc9003ae0063fc6f9377684212e3eaa66ed2\"", "start": 0, "total_size": 1}'} headers: content-length: ['431'] @@ -293,18 +292,7 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode DELETE - uri: http://localhost:9001/3.0/users/19 - 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/domains/example.com + uri: http://localhost:9001/3.0/users/91 response: body: {string: !!python/unicode ''} headers: diff --git a/src/postorius/tests/fixtures/vcr_cassettes/ListSummaryPageTest.test_list_summary_is_admin_secondary_owner.yaml b/src/postorius/tests/fixtures/vcr_cassettes/ListSummaryPageTest.test_list_summary_is_admin_secondary_owner.yaml index c52455a..517e528 100644 --- a/src/postorius/tests/fixtures/vcr_cassettes/ListSummaryPageTest.test_list_summary_is_admin_secondary_owner.yaml +++ b/src/postorius/tests/fixtures/vcr_cassettes/ListSummaryPageTest.test_list_summary_is_admin_secondary_owner.yaml @@ -51,7 +51,7 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - location: ['http://localhost:9001/3.0/users/20'] + location: ['http://localhost:9001/3.0/users/92'] status: {code: 201, message: Created} - request: body: email=anotheremail%40example.com @@ -59,7 +59,7 @@ accept-encoding: ['gzip, deflate'] !!python/unicode content-type: [!!python/unicode application/x-www-form-urlencoded] method: !!python/unicode POST - uri: http://localhost:9001/3.0/users/20/addresses + uri: http://localhost:9001/3.0/users/92/addresses response: body: {string: !!python/unicode ''} headers: @@ -113,9 +113,9 @@ uri: http://localhost:9001/3.0/users/test@example.com response: body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag": - "\"c02d17f3007e572a007943d53454ec0e599d8e67\"", "is_server_owner": false, - "password": "$6$rounds=641878$n6gaVnE7KKPaNxm2$ZMG73lmBTxTfNL6ArXMcReH4oOx1Zf9676JeA5FLaYLwUmF8d1Ou/ebPaC4ELlVGRboyan3Th6Tf/eirAJz8q.", - "self_link": "http://localhost:9001/3.0/users/20", "user_id": 20}'} + "\"e6a574de6180620a2f77370851409679fc5710a1\"", "is_server_owner": false, + "password": "$6$rounds=721240$xvkmQ5L73fNZ.oLZ$EhaGtVCgYUwTIV03fURcWLt/ip3paHdSI.wCfNaD38QVVo.c6kYIYjxLgy859kflUBeJcFBVvnLq9c8vRKlyj.", + "self_link": "http://localhost:9001/3.0/users/92", "user_id": 92}'} headers: content-length: ['326'] content-type: [application/json; charset=utf-8] @@ -125,16 +125,16 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode GET - uri: http://localhost:9001/3.0/users/20/addresses + uri: http://localhost:9001/3.0/users/92/addresses response: body: {string: !!python/unicode '{"entries": [{"email": "anotheremail@example.com", - "http_etag": "\"7d83f4db1f9f0fb3b64961fc4fa8e7a7ed185ab2\"", "original_email": + "http_etag": "\"5c11bf77c1a7150cc84209773d6dc47b4ac99570\"", "original_email": "anotheremail@example.com", "registered_on": "2005-08-01T07:49:23", "self_link": - "http://localhost:9001/3.0/addresses/anotheremail@example.com", "user": "http://localhost:9001/3.0/users/20", + "http://localhost:9001/3.0/addresses/anotheremail@example.com", "user": "http://localhost:9001/3.0/users/92", "verified_on": "2005-08-01T07:49:23"}, {"email": "test@example.com", "http_etag": - "\"0d24aeaa8558af4c8640bc902367b2e534efecc1\"", "original_email": "test@example.com", + "\"aa5526c7755d9e9b66cc07095e49bf2b1a3a6e26\"", "original_email": "test@example.com", "registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/test@example.com", - "user": "http://localhost:9001/3.0/users/20"}], "http_etag": "\"6eab02e99500b5096f908f95490e5053904ab875\"", + "user": "http://localhost:9001/3.0/users/92"}], "http_etag": "\"e5b8446598546dc8dc196346826ddbe13da5c589\"", "start": 0, "total_size": 2}'} headers: content-length: ['735'] @@ -164,10 +164,10 @@ response: body: {string: !!python/unicode '{"entries": [{"address": "http://localhost:9001/3.0/addresses/anotheremail@example.com", "delivery_mode": "regular", "email": "anotheremail@example.com", "http_etag": - "\"b45b4c48f726e05d2100037b52eb9daded1fdf90\"", "list_id": "foo.example.com", + "\"00da6ad71a71a2770a27066d6377b8322bccbe3c\"", "list_id": "foo.example.com", "member_id": 87, "moderation_action": "accept", "role": "owner", "self_link": - "http://localhost:9001/3.0/members/87", "user": "http://localhost:9001/3.0/users/20"}], - "http_etag": "\"31dc73505f6f47b70089c2c69ba970e85589e606\"", "start": 0, "total_size": + "http://localhost:9001/3.0/members/87", "user": "http://localhost:9001/3.0/users/92"}], + "http_etag": "\"b2bdac508b6b4d2f6d297d331059a5d89c7b6738\"", "start": 0, "total_size": 1}'} headers: content-length: ['500'] @@ -248,16 +248,15 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode GET - uri: http://localhost:9001/3.0/lists + uri: http://localhost:9001/3.0/domains response: - body: {string: !!python/unicode '{"entries": [{"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}], "http_etag": "\"0eb6d0b88c89b5c491b7966eab97a79e221096ad\"", + body: {string: !!python/unicode '{"entries": [{"base_url": "http://example.com", + "description": null, "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", + "mail_host": "example.com", "self_link": "http://localhost:9001/3.0/domains/example.com", + "url_host": "example.com"}], "http_etag": "\"c385b155f8da284bf78dbe075e20f58a30c893ab\"", "start": 0, "total_size": 1}'} headers: - content-length: ['399'] + content-length: ['338'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -265,7 +264,7 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode DELETE - uri: http://localhost:9001/3.0/lists/foo@example.com + uri: http://localhost:9001/3.0/domains/example.com response: body: {string: !!python/unicode ''} headers: @@ -279,10 +278,10 @@ uri: http://localhost:9001/3.0/users response: body: {string: !!python/unicode '{"entries": [{"created_on": "2005-08-01T07:49:23", - "http_etag": "\"c02d17f3007e572a007943d53454ec0e599d8e67\"", "is_server_owner": - false, "password": "$6$rounds=641878$n6gaVnE7KKPaNxm2$ZMG73lmBTxTfNL6ArXMcReH4oOx1Zf9676JeA5FLaYLwUmF8d1Ou/ebPaC4ELlVGRboyan3Th6Tf/eirAJz8q.", - "self_link": "http://localhost:9001/3.0/users/20", "user_id": 20}], "http_etag": - "\"815fc0b39e1bcf8e743e404a5bf80b9e0af6c724\"", "start": 0, "total_size": + "http_etag": "\"e6a574de6180620a2f77370851409679fc5710a1\"", "is_server_owner": + false, "password": "$6$rounds=721240$xvkmQ5L73fNZ.oLZ$EhaGtVCgYUwTIV03fURcWLt/ip3paHdSI.wCfNaD38QVVo.c6kYIYjxLgy859kflUBeJcFBVvnLq9c8vRKlyj.", + "self_link": "http://localhost:9001/3.0/users/92", "user_id": 92}], "http_etag": + "\"cdd4c8e53075390a59f8915a3d4a2fcd66c3a2c7\"", "start": 0, "total_size": 1}'} headers: content-length: ['431'] @@ -293,18 +292,7 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode DELETE - uri: http://localhost:9001/3.0/users/20 - 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/domains/example.com + uri: http://localhost:9001/3.0/users/92 response: body: {string: !!python/unicode ''} headers: diff --git a/src/postorius/tests/fixtures/vcr_cassettes/ListSummaryPageTest.test_list_summary_logged_in.yaml b/src/postorius/tests/fixtures/vcr_cassettes/ListSummaryPageTest.test_list_summary_logged_in.yaml index 1525872..9c521c4 100644 --- a/src/postorius/tests/fixtures/vcr_cassettes/ListSummaryPageTest.test_list_summary_logged_in.yaml +++ b/src/postorius/tests/fixtures/vcr_cassettes/ListSummaryPageTest.test_list_summary_logged_in.yaml @@ -143,16 +143,15 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode GET - uri: http://localhost:9001/3.0/lists + uri: http://localhost:9001/3.0/domains response: - body: {string: !!python/unicode '{"entries": [{"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}], "http_etag": "\"0eb6d0b88c89b5c491b7966eab97a79e221096ad\"", + body: {string: !!python/unicode '{"entries": [{"base_url": "http://example.com", + "description": null, "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", + "mail_host": "example.com", "self_link": "http://localhost:9001/3.0/domains/example.com", + "url_host": "example.com"}], "http_etag": "\"c385b155f8da284bf78dbe075e20f58a30c893ab\"", "start": 0, "total_size": 1}'} headers: - content-length: ['399'] + content-length: ['338'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -160,7 +159,7 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode DELETE - uri: http://localhost:9001/3.0/lists/foo@example.com + uri: http://localhost:9001/3.0/domains/example.com response: body: {string: !!python/unicode ''} headers: @@ -179,15 +178,4 @@ content-length: ['90'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} -- request: - body: null - headers: - accept-encoding: ['gzip, deflate'] - method: !!python/unicode DELETE - uri: http://localhost:9001/3.0/domains/example.com - response: - body: {string: !!python/unicode ''} - headers: - content-length: ['0'] - status: {code: 204, message: No Content} version: 1 diff --git a/src/postorius/tests/fixtures/vcr_cassettes/ListSummaryPageTest.test_list_summary_logged_out.yaml b/src/postorius/tests/fixtures/vcr_cassettes/ListSummaryPageTest.test_list_summary_logged_out.yaml index 06a8736..46ba842 100644 --- a/src/postorius/tests/fixtures/vcr_cassettes/ListSummaryPageTest.test_list_summary_logged_out.yaml +++ b/src/postorius/tests/fixtures/vcr_cassettes/ListSummaryPageTest.test_list_summary_logged_out.yaml @@ -93,16 +93,15 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode GET - uri: http://localhost:9001/3.0/lists + uri: http://localhost:9001/3.0/domains response: - body: {string: !!python/unicode '{"entries": [{"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}], "http_etag": "\"0eb6d0b88c89b5c491b7966eab97a79e221096ad\"", + body: {string: !!python/unicode '{"entries": [{"base_url": "http://example.com", + "description": null, "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", + "mail_host": "example.com", "self_link": "http://localhost:9001/3.0/domains/example.com", + "url_host": "example.com"}], "http_etag": "\"c385b155f8da284bf78dbe075e20f58a30c893ab\"", "start": 0, "total_size": 1}'} headers: - content-length: ['399'] + content-length: ['338'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -110,7 +109,7 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode DELETE - uri: http://localhost:9001/3.0/lists/foo@example.com + uri: http://localhost:9001/3.0/domains/example.com response: body: {string: !!python/unicode ''} headers: @@ -129,15 +128,4 @@ content-length: ['90'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} -- request: - body: null - headers: - accept-encoding: ['gzip, deflate'] - method: !!python/unicode DELETE - uri: http://localhost:9001/3.0/domains/example.com - response: - body: {string: !!python/unicode ''} - headers: - content-length: ['0'] - status: {code: 204, message: No Content} version: 1 diff --git a/src/postorius/tests/fixtures/vcr_cassettes/ListSummaryPageTest.test_list_summary_moderator.yaml b/src/postorius/tests/fixtures/vcr_cassettes/ListSummaryPageTest.test_list_summary_moderator.yaml index 6b50be7..1ea0428 100644 --- a/src/postorius/tests/fixtures/vcr_cassettes/ListSummaryPageTest.test_list_summary_moderator.yaml +++ b/src/postorius/tests/fixtures/vcr_cassettes/ListSummaryPageTest.test_list_summary_moderator.yaml @@ -51,7 +51,7 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - location: ['http://localhost:9001/3.0/users/21'] + location: ['http://localhost:9001/3.0/users/93'] status: {code: 201, message: Created} - request: body: null @@ -89,9 +89,9 @@ uri: http://localhost:9001/3.0/users/test@example.com response: body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag": - "\"1a5b2ae2a64f1a71b23d4e6e9313917a0199b4da\"", "is_server_owner": false, - "password": "$6$rounds=703099$E0oFo1./bB.XTife$SdfgmF8hB3fpXvXaX82mCePFT/hKzrzM7YV/nLy8HL3wN1nhwSQf1kxwMK5D4Pgsov.BShbaNxQOLIl244Iy//", - "self_link": "http://localhost:9001/3.0/users/21", "user_id": 21}'} + "\"56d86a6eed30be35b80a673dc5bd1ffb55eaecb3\"", "is_server_owner": false, + "password": "$6$rounds=601018$xuRwFtlRXckgN1jA$2THgt7iwYvQB3aLaiBNMvpLLCr76ZqlPwAR.xZf.ovg2nwIJkW8A/m/mkSY2N4P0M95pebE2zs8qsfdjMuS5T.", + "self_link": "http://localhost:9001/3.0/users/93", "user_id": 93}'} headers: content-length: ['326'] content-type: [application/json; charset=utf-8] @@ -101,12 +101,12 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode GET - uri: http://localhost:9001/3.0/users/21/addresses + uri: http://localhost:9001/3.0/users/93/addresses response: body: {string: !!python/unicode '{"entries": [{"email": "test@example.com", "http_etag": - "\"570223d675f7c6d987d7e3dbe5ac6baa570a868e\"", "original_email": "test@example.com", + "\"31ee0018c62463aeb4e1f91309c2117c6c7baf4c\"", "original_email": "test@example.com", "registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/test@example.com", - "user": "http://localhost:9001/3.0/users/21"}], "http_etag": "\"7d53bc886eeb6976e040c039ae7c3381013811ff\"", + "user": "http://localhost:9001/3.0/users/93"}], "http_etag": "\"d9584c5b72c15ffa822eb7bbd883029d6b6e1788\"", "start": 0, "total_size": 1}'} headers: content-length: ['388'] @@ -148,10 +148,10 @@ uri: http://localhost:9001/3.0/lists/foo.example.com/roster/moderator response: body: {string: !!python/unicode '{"entries": [{"address": "http://localhost:9001/3.0/addresses/test@example.com", - "delivery_mode": "regular", "email": "test@example.com", "http_etag": "\"524917a793e1f157e5e390c1b66c08ff9bc6871c\"", + "delivery_mode": "regular", "email": "test@example.com", "http_etag": "\"112863e2d929e79f83c9c900966089dc2821be30\"", "list_id": "foo.example.com", "member_id": 88, "moderation_action": "accept", "role": "moderator", "self_link": "http://localhost:9001/3.0/members/88", - "user": "http://localhost:9001/3.0/users/21"}], "http_etag": "\"a21b2b051bb4eaedd5bc8bb762d6fd224f5e38c5\"", + "user": "http://localhost:9001/3.0/users/93"}], "http_etag": "\"c4b13fb26802b1beb3dd298004c60ef0fed43832\"", "start": 0, "total_size": 1}'} headers: content-length: ['488'] @@ -207,16 +207,15 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode GET - uri: http://localhost:9001/3.0/lists + uri: http://localhost:9001/3.0/domains response: - body: {string: !!python/unicode '{"entries": [{"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}], "http_etag": "\"0eb6d0b88c89b5c491b7966eab97a79e221096ad\"", + body: {string: !!python/unicode '{"entries": [{"base_url": "http://example.com", + "description": null, "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", + "mail_host": "example.com", "self_link": "http://localhost:9001/3.0/domains/example.com", + "url_host": "example.com"}], "http_etag": "\"c385b155f8da284bf78dbe075e20f58a30c893ab\"", "start": 0, "total_size": 1}'} headers: - content-length: ['399'] + content-length: ['338'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -224,7 +223,7 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode DELETE - uri: http://localhost:9001/3.0/lists/foo@example.com + uri: http://localhost:9001/3.0/domains/example.com response: body: {string: !!python/unicode ''} headers: @@ -238,10 +237,10 @@ uri: http://localhost:9001/3.0/users response: body: {string: !!python/unicode '{"entries": [{"created_on": "2005-08-01T07:49:23", - "http_etag": "\"1a5b2ae2a64f1a71b23d4e6e9313917a0199b4da\"", "is_server_owner": - false, "password": "$6$rounds=703099$E0oFo1./bB.XTife$SdfgmF8hB3fpXvXaX82mCePFT/hKzrzM7YV/nLy8HL3wN1nhwSQf1kxwMK5D4Pgsov.BShbaNxQOLIl244Iy//", - "self_link": "http://localhost:9001/3.0/users/21", "user_id": 21}], "http_etag": - "\"7baa93a3a20fd952b0a4ddb7b6774f842ca26976\"", "start": 0, "total_size": + "http_etag": "\"56d86a6eed30be35b80a673dc5bd1ffb55eaecb3\"", "is_server_owner": + false, "password": "$6$rounds=601018$xuRwFtlRXckgN1jA$2THgt7iwYvQB3aLaiBNMvpLLCr76ZqlPwAR.xZf.ovg2nwIJkW8A/m/mkSY2N4P0M95pebE2zs8qsfdjMuS5T.", + "self_link": "http://localhost:9001/3.0/users/93", "user_id": 93}], "http_etag": + "\"68b83647bdaafa955e191afdfdee45823e1d53f6\"", "start": 0, "total_size": 1}'} headers: content-length: ['431'] @@ -252,18 +251,7 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode DELETE - uri: http://localhost:9001/3.0/users/21 - 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/domains/example.com + uri: http://localhost:9001/3.0/users/93 response: body: {string: !!python/unicode ''} headers: diff --git a/src/postorius/tests/fixtures/vcr_cassettes/ListSummaryPageTest.test_list_summary_owner.yaml b/src/postorius/tests/fixtures/vcr_cassettes/ListSummaryPageTest.test_list_summary_owner.yaml index 5e229eb..194ec43 100644 --- a/src/postorius/tests/fixtures/vcr_cassettes/ListSummaryPageTest.test_list_summary_owner.yaml +++ b/src/postorius/tests/fixtures/vcr_cassettes/ListSummaryPageTest.test_list_summary_owner.yaml @@ -51,7 +51,7 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - location: ['http://localhost:9001/3.0/users/22'] + location: ['http://localhost:9001/3.0/users/94'] status: {code: 201, message: Created} - request: body: null @@ -89,9 +89,9 @@ uri: http://localhost:9001/3.0/users/test@example.com response: body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag": - "\"c81b1d74a34901fe58538ac9adae4fef06c399e4\"", "is_server_owner": false, - "password": "$6$rounds=609529$Dt4t5TF7EzAInxSK$3tD8r2R4eRR0EsbSThItfTCArSH2E2VyvIv1VnWE3KIixJOoOQq1ca.ZXw2w43ORCjC6JZuUzPytj2NI5Y1n61", - "self_link": "http://localhost:9001/3.0/users/22", "user_id": 22}'} + "\"0e6bd427997094f06d5de81c729fbbc48ff80a08\"", "is_server_owner": false, + "password": "$6$rounds=671788$BcbdgAn2ua/IZFmm$MnyxI2TiMMxM16MoGUXgSSH61Cn1lk3TlbPLLgrfHEONHJOlcG/WT9/l.9lcxD9eZrW/lCRbS79gTkN6j6w...", + "self_link": "http://localhost:9001/3.0/users/94", "user_id": 94}'} headers: content-length: ['326'] content-type: [application/json; charset=utf-8] @@ -101,12 +101,12 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode GET - uri: http://localhost:9001/3.0/users/22/addresses + uri: http://localhost:9001/3.0/users/94/addresses response: body: {string: !!python/unicode '{"entries": [{"email": "test@example.com", "http_etag": - "\"d3d6f6bd219cab118fc7f964e53cc459d80b171f\"", "original_email": "test@example.com", + "\"2338779acf123427dafdd729944dac6b2a9bd1a9\"", "original_email": "test@example.com", "registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/test@example.com", - "user": "http://localhost:9001/3.0/users/22"}], "http_etag": "\"e05da3245a967d14f893e97380b3e3880319cb45\"", + "user": "http://localhost:9001/3.0/users/94"}], "http_etag": "\"2e3d56ca9cd43908ad8d754e46e1aa04b10a781c\"", "start": 0, "total_size": 1}'} headers: content-length: ['388'] @@ -135,10 +135,10 @@ 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/test@example.com", - "delivery_mode": "regular", "email": "test@example.com", "http_etag": "\"ed240f6c008e53a2ed605025105a5f10bc6d5f0f\"", + "delivery_mode": "regular", "email": "test@example.com", "http_etag": "\"e8b198b4c0836f61467a2a043253165822f156a6\"", "list_id": "foo.example.com", "member_id": 89, "moderation_action": "accept", "role": "owner", "self_link": "http://localhost:9001/3.0/members/89", "user": - "http://localhost:9001/3.0/users/22"}], "http_etag": "\"c753acc2e359635865cbde996525114b2e45bd1e\"", + "http://localhost:9001/3.0/users/94"}], "http_etag": "\"9d97319e0ba6194fbde2d6341b6ca4907acc9264\"", "start": 0, "total_size": 1}'} headers: content-length: ['484'] @@ -207,16 +207,15 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode GET - uri: http://localhost:9001/3.0/lists + uri: http://localhost:9001/3.0/domains response: - body: {string: !!python/unicode '{"entries": [{"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}], "http_etag": "\"0eb6d0b88c89b5c491b7966eab97a79e221096ad\"", + body: {string: !!python/unicode '{"entries": [{"base_url": "http://example.com", + "description": null, "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", + "mail_host": "example.com", "self_link": "http://localhost:9001/3.0/domains/example.com", + "url_host": "example.com"}], "http_etag": "\"c385b155f8da284bf78dbe075e20f58a30c893ab\"", "start": 0, "total_size": 1}'} headers: - content-length: ['399'] + content-length: ['338'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -224,7 +223,7 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode DELETE - uri: http://localhost:9001/3.0/lists/foo@example.com + uri: http://localhost:9001/3.0/domains/example.com response: body: {string: !!python/unicode ''} headers: @@ -238,10 +237,10 @@ uri: http://localhost:9001/3.0/users response: body: {string: !!python/unicode '{"entries": [{"created_on": "2005-08-01T07:49:23", - "http_etag": "\"c81b1d74a34901fe58538ac9adae4fef06c399e4\"", "is_server_owner": - false, "password": "$6$rounds=609529$Dt4t5TF7EzAInxSK$3tD8r2R4eRR0EsbSThItfTCArSH2E2VyvIv1VnWE3KIixJOoOQq1ca.ZXw2w43ORCjC6JZuUzPytj2NI5Y1n61", - "self_link": "http://localhost:9001/3.0/users/22", "user_id": 22}], "http_etag": - "\"05ad838879385573b0da6af4c63cb645049555e5\"", "start": 0, "total_size": + "http_etag": "\"0e6bd427997094f06d5de81c729fbbc48ff80a08\"", "is_server_owner": + false, "password": "$6$rounds=671788$BcbdgAn2ua/IZFmm$MnyxI2TiMMxM16MoGUXgSSH61Cn1lk3TlbPLLgrfHEONHJOlcG/WT9/l.9lcxD9eZrW/lCRbS79gTkN6j6w...", + "self_link": "http://localhost:9001/3.0/users/94", "user_id": 94}], "http_etag": + "\"6c3c4793aad0f921c78643fc1eb00c2a9b0a82d2\"", "start": 0, "total_size": 1}'} headers: content-length: ['431'] @@ -252,18 +251,7 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode DELETE - uri: http://localhost:9001/3.0/users/22 - 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/domains/example.com + uri: http://localhost:9001/3.0/users/94 response: body: {string: !!python/unicode ''} headers: diff --git a/src/postorius/tests/fixtures/vcr_cassettes/ListSummaryPageTest.test_list_summary_shows_all_addresses.yaml b/src/postorius/tests/fixtures/vcr_cassettes/ListSummaryPageTest.test_list_summary_shows_all_addresses.yaml index cfe3c86..ed53e78 100644 --- a/src/postorius/tests/fixtures/vcr_cassettes/ListSummaryPageTest.test_list_summary_shows_all_addresses.yaml +++ b/src/postorius/tests/fixtures/vcr_cassettes/ListSummaryPageTest.test_list_summary_shows_all_addresses.yaml @@ -77,8 +77,8 @@ uri: http://localhost:9001/3.0/users/test@example.com response: body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "display_name": - "None", "http_etag": "\"2b30bdb92c39e9fa387d2c670a5ebb8d14fb6d07\"", "is_server_owner": - false, "self_link": "http://localhost:9001/3.0/users/23", "user_id": 23}'} + "None", "http_etag": "\"59cde8cbd18040da8b4a9455bcf71a1845de95ad\"", "is_server_owner": + false, "self_link": "http://localhost:9001/3.0/users/95", "user_id": 95}'} headers: content-length: ['214'] content-type: [application/json; charset=utf-8] @@ -89,7 +89,7 @@ accept-encoding: ['gzip, deflate'] !!python/unicode content-type: [!!python/unicode application/x-www-form-urlencoded] method: !!python/unicode POST - uri: http://localhost:9001/3.0/users/23/addresses + uri: http://localhost:9001/3.0/users/95/addresses response: body: {string: !!python/unicode ''} headers: @@ -115,8 +115,8 @@ uri: http://localhost:9001/3.0/users/test@example.com response: body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "display_name": - "None", "http_etag": "\"2b30bdb92c39e9fa387d2c670a5ebb8d14fb6d07\"", "is_server_owner": - false, "self_link": "http://localhost:9001/3.0/users/23", "user_id": 23}'} + "None", "http_etag": "\"59cde8cbd18040da8b4a9455bcf71a1845de95ad\"", "is_server_owner": + false, "self_link": "http://localhost:9001/3.0/users/95", "user_id": 95}'} headers: content-length: ['214'] content-type: [application/json; charset=utf-8] @@ -126,16 +126,16 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode GET - uri: http://localhost:9001/3.0/users/23/addresses + uri: http://localhost:9001/3.0/users/95/addresses response: body: {string: !!python/unicode '{"entries": [{"email": "anotheremail@example.com", - "http_etag": "\"9780bbacff606b3e4266b76f54d99963dc591447\"", "original_email": + "http_etag": "\"29e37ef9df1a6b1fe5f7310c47caa320cc3e1d5f\"", "original_email": "anotheremail@example.com", "registered_on": "2005-08-01T07:49:23", "self_link": - "http://localhost:9001/3.0/addresses/anotheremail@example.com", "user": "http://localhost:9001/3.0/users/23", + "http://localhost:9001/3.0/addresses/anotheremail@example.com", "user": "http://localhost:9001/3.0/users/95", "verified_on": "2005-08-01T07:49:23"}, {"display_name": "None", "email": "test@example.com", - "http_etag": "\"3b0ec55f347e905ab949f9060cca23d11a3b1278\"", "original_email": + "http_etag": "\"a01c0261cfdbab95344992fc8c11b0fcec6a0b8a\"", "original_email": "test@example.com", "registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/test@example.com", - "user": "http://localhost:9001/3.0/users/23"}], "http_etag": "\"9a16e5f96a718c35c382fa42adb54fc6029c449e\"", + "user": "http://localhost:9001/3.0/users/95"}], "http_etag": "\"884bbe9dabe6f7fbae03265a71aa486b9dd74642\"", "start": 0, "total_size": 2}'} headers: content-length: ['759'] @@ -244,16 +244,15 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode GET - uri: http://localhost:9001/3.0/lists + uri: http://localhost:9001/3.0/domains response: - body: {string: !!python/unicode '{"entries": [{"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}], "http_etag": "\"0eb6d0b88c89b5c491b7966eab97a79e221096ad\"", + body: {string: !!python/unicode '{"entries": [{"base_url": "http://example.com", + "description": null, "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", + "mail_host": "example.com", "self_link": "http://localhost:9001/3.0/domains/example.com", + "url_host": "example.com"}], "http_etag": "\"c385b155f8da284bf78dbe075e20f58a30c893ab\"", "start": 0, "total_size": 1}'} headers: - content-length: ['399'] + content-length: ['338'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -261,7 +260,7 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode DELETE - uri: http://localhost:9001/3.0/lists/foo@example.com + uri: http://localhost:9001/3.0/domains/example.com response: body: {string: !!python/unicode ''} headers: @@ -275,9 +274,9 @@ uri: http://localhost:9001/3.0/users response: body: {string: !!python/unicode '{"entries": [{"created_on": "2005-08-01T07:49:23", - "display_name": "None", "http_etag": "\"2b30bdb92c39e9fa387d2c670a5ebb8d14fb6d07\"", - "is_server_owner": false, "self_link": "http://localhost:9001/3.0/users/23", - "user_id": 23}], "http_etag": "\"5ea3c6c66324927faeb88c1d0077bfe35b6f6385\"", + "display_name": "None", "http_etag": "\"59cde8cbd18040da8b4a9455bcf71a1845de95ad\"", + "is_server_owner": false, "self_link": "http://localhost:9001/3.0/users/95", + "user_id": 95}], "http_etag": "\"48db5140932313fe38af7e70f642cf1338c3352c\"", "start": 0, "total_size": 1}'} headers: content-length: ['319'] @@ -288,18 +287,7 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode DELETE - uri: http://localhost:9001/3.0/users/23 - 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/domains/example.com + uri: http://localhost:9001/3.0/users/95 response: body: {string: !!python/unicode ''} headers: diff --git a/src/postorius/tests/fixtures/vcr_cassettes/ListSummaryPageTest.test_metrics_not_displayed_to_anonymous.yaml b/src/postorius/tests/fixtures/vcr_cassettes/ListSummaryPageTest.test_metrics_not_displayed_to_anonymous.yaml index 06a8736..46ba842 100644 --- a/src/postorius/tests/fixtures/vcr_cassettes/ListSummaryPageTest.test_metrics_not_displayed_to_anonymous.yaml +++ b/src/postorius/tests/fixtures/vcr_cassettes/ListSummaryPageTest.test_metrics_not_displayed_to_anonymous.yaml @@ -93,16 +93,15 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode GET - uri: http://localhost:9001/3.0/lists + uri: http://localhost:9001/3.0/domains response: - body: {string: !!python/unicode '{"entries": [{"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}], "http_etag": "\"0eb6d0b88c89b5c491b7966eab97a79e221096ad\"", + body: {string: !!python/unicode '{"entries": [{"base_url": "http://example.com", + "description": null, "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", + "mail_host": "example.com", "self_link": "http://localhost:9001/3.0/domains/example.com", + "url_host": "example.com"}], "http_etag": "\"c385b155f8da284bf78dbe075e20f58a30c893ab\"", "start": 0, "total_size": 1}'} headers: - content-length: ['399'] + content-length: ['338'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -110,7 +109,7 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode DELETE - uri: http://localhost:9001/3.0/lists/foo@example.com + uri: http://localhost:9001/3.0/domains/example.com response: body: {string: !!python/unicode ''} headers: @@ -129,15 +128,4 @@ content-length: ['90'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} -- request: - body: null - headers: - accept-encoding: ['gzip, deflate'] - method: !!python/unicode DELETE - uri: http://localhost:9001/3.0/domains/example.com - response: - body: {string: !!python/unicode ''} - headers: - content-length: ['0'] - status: {code: 204, message: No Content} version: 1 diff --git a/src/postorius/tests/fixtures/vcr_cassettes/ListSummaryPageTest.test_unsubscribe_button_is_available.yaml b/src/postorius/tests/fixtures/vcr_cassettes/ListSummaryPageTest.test_unsubscribe_button_is_available.yaml index 66c57ea..05fd721 100644 --- a/src/postorius/tests/fixtures/vcr_cassettes/ListSummaryPageTest.test_unsubscribe_button_is_available.yaml +++ b/src/postorius/tests/fixtures/vcr_cassettes/ListSummaryPageTest.test_unsubscribe_button_is_available.yaml @@ -76,8 +76,8 @@ uri: http://localhost:9001/3.0/users/test@example.com response: body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "display_name": - "None", "http_etag": "\"3a89cb850ca143fca85a1bb1f52eefacbc198eee\"", "is_server_owner": - false, "self_link": "http://localhost:9001/3.0/users/24", "user_id": 24}'} + "None", "http_etag": "\"8badf2306869a55a955be97d314d60b5e683d1b7\"", "is_server_owner": + false, "self_link": "http://localhost:9001/3.0/users/96", "user_id": 96}'} headers: content-length: ['214'] content-type: [application/json; charset=utf-8] @@ -87,14 +87,14 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode GET - uri: http://localhost:9001/3.0/users/24/addresses + uri: http://localhost:9001/3.0/users/96/addresses response: body: {string: !!python/unicode '{"entries": [{"display_name": "None", "email": - "test@example.com", "http_etag": "\"add888697c7f18081f17e4fe2b95bdcb0bb49a9e\"", + "test@example.com", "http_etag": "\"32fd46b7c9722a16e3cf6351e7101e77aff0befa\"", "original_email": "test@example.com", "registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/test@example.com", "user": - "http://localhost:9001/3.0/users/24", "verified_on": "2005-08-01T07:49:23"}], - "http_etag": "\"3ed0e85bcd6291da18673b727da711791fac5579\"", "start": 0, "total_size": + "http://localhost:9001/3.0/users/96", "verified_on": "2005-08-01T07:49:23"}], + "http_etag": "\"4f7b48afe11d465cdcedecefc8a0616a5bd04ff7\"", "start": 0, "total_size": 1}'} headers: content-length: ['450'] @@ -149,12 +149,11 @@ uri: http://localhost:9001/3.0/lists/foo.example.com/member/test@example.com response: body: {string: !!python/unicode '{"address": "http://localhost:9001/3.0/addresses/test@example.com", - "delivery_mode": "regular", "email": "test@example.com", "http_etag": "\"5997a67942ff139eb2e1ab43f4ea8fbf3502d77e\"", - "list_id": "foo.example.com", "member_id": 90, "moderation_action": "defer", - "role": "member", "self_link": "http://localhost:9001/3.0/members/90", "user": - "http://localhost:9001/3.0/users/24"}'} + "delivery_mode": "regular", "email": "test@example.com", "http_etag": "\"85295f25f0c328f5dc5a887601ad8083f51c6c82\"", + "list_id": "foo.example.com", "member_id": 90, "role": "member", "self_link": + "http://localhost:9001/3.0/members/90", "user": "http://localhost:9001/3.0/users/96"}'} headers: - content-length: ['379'] + content-length: ['349'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -195,16 +194,15 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode GET - uri: http://localhost:9001/3.0/lists + uri: http://localhost:9001/3.0/domains response: - body: {string: !!python/unicode '{"entries": [{"display_name": "Foo", "fqdn_listname": - "foo@example.com", "http_etag": "\"98cc998d4a30293ec17da639bce10617912a6e1e\"", - "list_id": "foo.example.com", "list_name": "foo", "mail_host": "example.com", - "member_count": 1, "self_link": "http://localhost:9001/3.0/lists/foo.example.com", - "volume": 1}], "http_etag": "\"89bf5f8f6c4414c38432c355907ddf9f419ef53b\"", + body: {string: !!python/unicode '{"entries": [{"base_url": "http://example.com", + "description": null, "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", + "mail_host": "example.com", "self_link": "http://localhost:9001/3.0/domains/example.com", + "url_host": "example.com"}], "http_etag": "\"c385b155f8da284bf78dbe075e20f58a30c893ab\"", "start": 0, "total_size": 1}'} headers: - content-length: ['399'] + content-length: ['338'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -212,7 +210,7 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode DELETE - uri: http://localhost:9001/3.0/lists/foo@example.com + uri: http://localhost:9001/3.0/domains/example.com response: body: {string: !!python/unicode ''} headers: @@ -226,9 +224,9 @@ uri: http://localhost:9001/3.0/users response: body: {string: !!python/unicode '{"entries": [{"created_on": "2005-08-01T07:49:23", - "display_name": "None", "http_etag": "\"3a89cb850ca143fca85a1bb1f52eefacbc198eee\"", - "is_server_owner": false, "self_link": "http://localhost:9001/3.0/users/24", - "user_id": 24}], "http_etag": "\"8e5272b27cf78afa5baedd2e9b3ec91b5293acad\"", + "display_name": "None", "http_etag": "\"8badf2306869a55a955be97d314d60b5e683d1b7\"", + "is_server_owner": false, "self_link": "http://localhost:9001/3.0/users/96", + "user_id": 96}], "http_etag": "\"07a321530b06e163764307ad5ce482830d379ca9\"", "start": 0, "total_size": 1}'} headers: content-length: ['319'] @@ -239,18 +237,7 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode DELETE - uri: http://localhost:9001/3.0/users/24 - 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/domains/example.com + uri: http://localhost:9001/3.0/users/96 response: body: {string: !!python/unicode ''} headers: diff --git a/src/postorius/tests/fixtures/vcr_cassettes/MailmanUserTest.test_address_based_preferences.yaml b/src/postorius/tests/fixtures/vcr_cassettes/MailmanUserTest.test_address_based_preferences.yaml index c5a09ee..fa66d70 100644 --- a/src/postorius/tests/fixtures/vcr_cassettes/MailmanUserTest.test_address_based_preferences.yaml +++ b/src/postorius/tests/fixtures/vcr_cassettes/MailmanUserTest.test_address_based_preferences.yaml @@ -51,7 +51,7 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - location: ['http://localhost:9001/3.0/users/10'] + location: ['http://localhost:9001/3.0/users/82'] status: {code: 201, message: Created} - request: body: email=user2%40example.com @@ -59,7 +59,7 @@ accept-encoding: ['gzip, deflate'] !!python/unicode content-type: [!!python/unicode application/x-www-form-urlencoded] method: !!python/unicode POST - uri: http://localhost:9001/3.0/users/10/addresses + uri: http://localhost:9001/3.0/users/82/addresses response: body: {string: !!python/unicode ''} headers: @@ -72,7 +72,7 @@ accept-encoding: ['gzip, deflate'] !!python/unicode content-type: [!!python/unicode application/x-www-form-urlencoded] method: !!python/unicode POST - uri: http://localhost:9001/3.0/users/10/addresses + uri: http://localhost:9001/3.0/users/82/addresses response: body: {string: !!python/unicode ''} headers: @@ -87,9 +87,9 @@ uri: http://localhost:9001/3.0/users/user@example.com response: body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag": - "\"a15f70929a19063dd54c74a74094ffb51c5d79e5\"", "is_server_owner": false, - "password": "$6$rounds=661016$9GD4wfI1Nhlg7i63$QaYvGd35DyWCmB22cnRGZ0e4Z2kA3OxzM4QeAT0FnHwSA/sfdXwL3Tci.L5og2owBBRf5mGDpPF1rrT/xcgi61", - "self_link": "http://localhost:9001/3.0/users/10", "user_id": 10}'} + "\"3c772caf0ccf6cc8dfb1889df6abf6a3b45b863e\"", "is_server_owner": false, + "password": "$6$rounds=703772$/1eng50MQTVZJ99r$zZzgoBGkXANNTHxDwqsLwdIDcLoyymJ.u6SdIUxQ/3Z8HSwoj4UX8UshUhp82CpHNfRoZR.P/q8NI1xsZKYCo/", + "self_link": "http://localhost:9001/3.0/users/82", "user_id": 82}'} headers: content-length: ['326'] content-type: [application/json; charset=utf-8] @@ -99,19 +99,19 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode GET - uri: http://localhost:9001/3.0/users/10/addresses + uri: http://localhost:9001/3.0/users/82/addresses response: body: {string: !!python/unicode '{"entries": [{"email": "user2@example.com", "http_etag": - "\"f7784cff6f71115977f197b970df92339cab52e0\"", "original_email": "user2@example.com", + "\"43371558cf942bb898abc8a60db1bd5080bd162a\"", "original_email": "user2@example.com", "registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/user2@example.com", - "user": "http://localhost:9001/3.0/users/10"}, {"email": "user3@example.com", - "http_etag": "\"e883b257cdb44ccc14c3e16a7603964851ce8668\"", "original_email": + "user": "http://localhost:9001/3.0/users/82"}, {"email": "user3@example.com", + "http_etag": "\"6276c00ff811d06ea731be4b87ba9ab5e652d6b8\"", "original_email": "user3@example.com", "registered_on": "2005-08-01T07:49:23", "self_link": - "http://localhost:9001/3.0/addresses/user3@example.com", "user": "http://localhost:9001/3.0/users/10"}, - {"email": "user@example.com", "http_etag": "\"96d25437673d1b13cb9d473f3c2473efa7350658\"", + "http://localhost:9001/3.0/addresses/user3@example.com", "user": "http://localhost:9001/3.0/users/82"}, + {"email": "user@example.com", "http_etag": "\"1fe086fefb42a09a9a22a5f0ca7eb839b36055fb\"", "original_email": "user@example.com", "registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/user@example.com", "user": - "http://localhost:9001/3.0/users/10"}], "http_etag": "\"df3fe315c0bfe739235376276fedcfeba7e76356\"", + "http://localhost:9001/3.0/users/82"}], "http_etag": "\"ef4a8b9243a967e17188302f31ee2108d617ca05\"", "start": 0, "total_size": 3}'} headers: content-length: ['964'] @@ -125,9 +125,9 @@ uri: http://localhost:9001/3.0/users/user@example.com response: body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag": - "\"a15f70929a19063dd54c74a74094ffb51c5d79e5\"", "is_server_owner": false, - "password": "$6$rounds=661016$9GD4wfI1Nhlg7i63$QaYvGd35DyWCmB22cnRGZ0e4Z2kA3OxzM4QeAT0FnHwSA/sfdXwL3Tci.L5og2owBBRf5mGDpPF1rrT/xcgi61", - "self_link": "http://localhost:9001/3.0/users/10", "user_id": 10}'} + "\"3c772caf0ccf6cc8dfb1889df6abf6a3b45b863e\"", "is_server_owner": false, + "password": "$6$rounds=703772$/1eng50MQTVZJ99r$zZzgoBGkXANNTHxDwqsLwdIDcLoyymJ.u6SdIUxQ/3Z8HSwoj4UX8UshUhp82CpHNfRoZR.P/q8NI1xsZKYCo/", + "self_link": "http://localhost:9001/3.0/users/82", "user_id": 82}'} headers: content-length: ['326'] content-type: [application/json; charset=utf-8] @@ -137,19 +137,19 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode GET - uri: http://localhost:9001/3.0/users/10/addresses + uri: http://localhost:9001/3.0/users/82/addresses response: body: {string: !!python/unicode '{"entries": [{"email": "user2@example.com", "http_etag": - "\"f7784cff6f71115977f197b970df92339cab52e0\"", "original_email": "user2@example.com", + "\"43371558cf942bb898abc8a60db1bd5080bd162a\"", "original_email": "user2@example.com", "registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/user2@example.com", - "user": "http://localhost:9001/3.0/users/10"}, {"email": "user3@example.com", - "http_etag": "\"e883b257cdb44ccc14c3e16a7603964851ce8668\"", "original_email": + "user": "http://localhost:9001/3.0/users/82"}, {"email": "user3@example.com", + "http_etag": "\"6276c00ff811d06ea731be4b87ba9ab5e652d6b8\"", "original_email": "user3@example.com", "registered_on": "2005-08-01T07:49:23", "self_link": - "http://localhost:9001/3.0/addresses/user3@example.com", "user": "http://localhost:9001/3.0/users/10"}, - {"email": "user@example.com", "http_etag": "\"96d25437673d1b13cb9d473f3c2473efa7350658\"", + "http://localhost:9001/3.0/addresses/user3@example.com", "user": "http://localhost:9001/3.0/users/82"}, + {"email": "user@example.com", "http_etag": "\"1fe086fefb42a09a9a22a5f0ca7eb839b36055fb\"", "original_email": "user@example.com", "registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/user@example.com", "user": - "http://localhost:9001/3.0/users/10"}], "http_etag": "\"df3fe315c0bfe739235376276fedcfeba7e76356\"", + "http://localhost:9001/3.0/users/82"}], "http_etag": "\"ef4a8b9243a967e17188302f31ee2108d617ca05\"", "start": 0, "total_size": 3}'} headers: content-length: ['964'] @@ -163,9 +163,9 @@ uri: http://localhost:9001/3.0/users/user@example.com response: body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag": - "\"a15f70929a19063dd54c74a74094ffb51c5d79e5\"", "is_server_owner": false, - "password": "$6$rounds=661016$9GD4wfI1Nhlg7i63$QaYvGd35DyWCmB22cnRGZ0e4Z2kA3OxzM4QeAT0FnHwSA/sfdXwL3Tci.L5og2owBBRf5mGDpPF1rrT/xcgi61", - "self_link": "http://localhost:9001/3.0/users/10", "user_id": 10}'} + "\"3c772caf0ccf6cc8dfb1889df6abf6a3b45b863e\"", "is_server_owner": false, + "password": "$6$rounds=703772$/1eng50MQTVZJ99r$zZzgoBGkXANNTHxDwqsLwdIDcLoyymJ.u6SdIUxQ/3Z8HSwoj4UX8UshUhp82CpHNfRoZR.P/q8NI1xsZKYCo/", + "self_link": "http://localhost:9001/3.0/users/82", "user_id": 82}'} headers: content-length: ['326'] content-type: [application/json; charset=utf-8] @@ -175,19 +175,19 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode GET - uri: http://localhost:9001/3.0/users/10/addresses + uri: http://localhost:9001/3.0/users/82/addresses response: body: {string: !!python/unicode '{"entries": [{"email": "user2@example.com", "http_etag": - "\"f7784cff6f71115977f197b970df92339cab52e0\"", "original_email": "user2@example.com", + "\"43371558cf942bb898abc8a60db1bd5080bd162a\"", "original_email": "user2@example.com", "registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/user2@example.com", - "user": "http://localhost:9001/3.0/users/10"}, {"email": "user3@example.com", - "http_etag": "\"e883b257cdb44ccc14c3e16a7603964851ce8668\"", "original_email": + "user": "http://localhost:9001/3.0/users/82"}, {"email": "user3@example.com", + "http_etag": "\"6276c00ff811d06ea731be4b87ba9ab5e652d6b8\"", "original_email": "user3@example.com", "registered_on": "2005-08-01T07:49:23", "self_link": - "http://localhost:9001/3.0/addresses/user3@example.com", "user": "http://localhost:9001/3.0/users/10"}, - {"email": "user@example.com", "http_etag": "\"96d25437673d1b13cb9d473f3c2473efa7350658\"", + "http://localhost:9001/3.0/addresses/user3@example.com", "user": "http://localhost:9001/3.0/users/82"}, + {"email": "user@example.com", "http_etag": "\"1fe086fefb42a09a9a22a5f0ca7eb839b36055fb\"", "original_email": "user@example.com", "registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/user@example.com", "user": - "http://localhost:9001/3.0/users/10"}], "http_etag": "\"df3fe315c0bfe739235376276fedcfeba7e76356\"", + "http://localhost:9001/3.0/users/82"}], "http_etag": "\"ef4a8b9243a967e17188302f31ee2108d617ca05\"", "start": 0, "total_size": 3}'} headers: content-length: ['964'] @@ -237,14 +237,15 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode GET - uri: http://localhost:9001/3.0/lists/foo.example.com + uri: http://localhost:9001/3.0/domains 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}'} + body: {string: !!python/unicode '{"entries": [{"base_url": "http://example.com", + "description": null, "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", + "mail_host": "example.com", "self_link": "http://localhost:9001/3.0/domains/example.com", + "url_host": "example.com"}], "http_etag": "\"c385b155f8da284bf78dbe075e20f58a30c893ab\"", + "start": 0, "total_size": 1}'} headers: - content-length: ['294'] + content-length: ['338'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -252,32 +253,38 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode DELETE - uri: http://localhost:9001/3.0/lists/foo@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/users/10 - 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/domains/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 + response: + body: {string: !!python/unicode '{"entries": [{"created_on": "2005-08-01T07:49:23", + "http_etag": "\"3c772caf0ccf6cc8dfb1889df6abf6a3b45b863e\"", "is_server_owner": + false, "password": "$6$rounds=703772$/1eng50MQTVZJ99r$zZzgoBGkXANNTHxDwqsLwdIDcLoyymJ.u6SdIUxQ/3Z8HSwoj4UX8UshUhp82CpHNfRoZR.P/q8NI1xsZKYCo/", + "self_link": "http://localhost:9001/3.0/users/82", "user_id": 82}], "http_etag": + "\"226573f353b5a8a2ff9c8de80fefa98abb2c6ea7\"", "start": 0, "total_size": + 1}'} + headers: + content-length: ['431'] + 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/82 + response: + body: {string: !!python/unicode ''} + headers: + content-length: ['0'] + status: {code: 204, message: No Content} version: 1 diff --git a/src/postorius/tests/fixtures/vcr_cassettes/MailmanUserTest.test_address_preferences_not_logged_in.yaml b/src/postorius/tests/fixtures/vcr_cassettes/MailmanUserTest.test_address_preferences_not_logged_in.yaml index 12f3fad..705da6b 100644 --- a/src/postorius/tests/fixtures/vcr_cassettes/MailmanUserTest.test_address_preferences_not_logged_in.yaml +++ b/src/postorius/tests/fixtures/vcr_cassettes/MailmanUserTest.test_address_preferences_not_logged_in.yaml @@ -51,21 +51,22 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - location: ['http://localhost:9001/3.0/users/11'] + location: ['http://localhost:9001/3.0/users/83'] status: {code: 201, message: Created} - request: body: null headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode GET - uri: http://localhost:9001/3.0/lists/foo.example.com + uri: http://localhost:9001/3.0/domains 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}'} + body: {string: !!python/unicode '{"entries": [{"base_url": "http://example.com", + "description": null, "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", + "mail_host": "example.com", "self_link": "http://localhost:9001/3.0/domains/example.com", + "url_host": "example.com"}], "http_etag": "\"c385b155f8da284bf78dbe075e20f58a30c893ab\"", + "start": 0, "total_size": 1}'} headers: - content-length: ['294'] + content-length: ['338'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -73,32 +74,38 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode DELETE - uri: http://localhost:9001/3.0/lists/foo@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/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/domains/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 + response: + body: {string: !!python/unicode '{"entries": [{"created_on": "2005-08-01T07:49:23", + "http_etag": "\"118b93af19b87d6b415a1a39d5768cb752881a3c\"", "is_server_owner": + false, "password": "$6$rounds=633725$cl3TKCbGyT/UF1nQ$Bd/R71Zok43DLlQ7fec59q5Aa8CfrCmnrBuq0LrW9wwOl.Hx4XjqsWw5Jsv83dQlPqmfbdXkvL5AJDCHJ/cjY0", + "self_link": "http://localhost:9001/3.0/users/83", "user_id": 83}], "http_etag": + "\"6da629413819465ac2ffa4cc701847a947d1be29\"", "start": 0, "total_size": + 1}'} + headers: + content-length: ['431'] + 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/83 + response: + body: {string: !!python/unicode ''} + headers: + content-length: ['0'] + status: {code: 204, message: No Content} version: 1 diff --git a/src/postorius/tests/fixtures/vcr_cassettes/MailmanUserTest.test_preferences_none.yaml b/src/postorius/tests/fixtures/vcr_cassettes/MailmanUserTest.test_preferences_none.yaml index ea0ca92..6687452 100644 --- a/src/postorius/tests/fixtures/vcr_cassettes/MailmanUserTest.test_preferences_none.yaml +++ b/src/postorius/tests/fixtures/vcr_cassettes/MailmanUserTest.test_preferences_none.yaml @@ -51,7 +51,7 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - location: ['http://localhost:9001/3.0/users/12'] + location: ['http://localhost:9001/3.0/users/84'] status: {code: 201, message: Created} - request: body: null @@ -89,9 +89,9 @@ uri: http://localhost:9001/3.0/users/user@example.com response: body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag": - "\"1f6fe4f5e1cca6aee94e40fbf61466954ef4ea02\"", "is_server_owner": false, - "password": "$6$rounds=709593$ZV1v1LM8bM5wK5r5$O68BlmO3yf0bLX5gHK7vrvhAcck5PMH./A7FOaVkgl840xvAGX8ZRJJ.BDW2HqRP.olWFGKVO/hbw84R84ae90", - "self_link": "http://localhost:9001/3.0/users/12", "user_id": 12}'} + "\"ca92ce92be7bc92827a5295f67ebc3bb29e32afe\"", "is_server_owner": false, + "password": "$6$rounds=649364$KharsE48ZBcvV9zK$XfVHGRyCv8s63ubcGM7YbN2nKPV9x9RULhWJXF8d0VxHgVKqTQL25tMe2o8ua9Wz5TI4v3Reg5dUbOYB0sh4m1", + "self_link": "http://localhost:9001/3.0/users/84", "user_id": 84}'} headers: content-length: ['326'] content-type: [application/json; charset=utf-8] @@ -101,13 +101,13 @@ 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/84/addresses response: body: {string: !!python/unicode '{"entries": [{"email": "user@example.com", "http_etag": - "\"3038369cddc9208628cc60aa23f4805d14a75693\"", "original_email": "user@example.com", + "\"075a1242d2fc0128cbe4dc6bc827a24c1a2bdbd7\"", "original_email": "user@example.com", "registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/user@example.com", - "user": "http://localhost:9001/3.0/users/12", "verified_on": "2005-08-01T07:49:23"}], - "http_etag": "\"93aecb82eb7630061970ab7c3fea863f83fcc3be\"", "start": 0, "total_size": + "user": "http://localhost:9001/3.0/users/84", "verified_on": "2005-08-01T07:49:23"}], + "http_etag": "\"66ed8a5fe577da55fc26950e1370389410e08b86\"", "start": 0, "total_size": 1}'} headers: content-length: ['426'] @@ -121,9 +121,9 @@ uri: http://localhost:9001/3.0/users/user@example.com response: body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag": - "\"1f6fe4f5e1cca6aee94e40fbf61466954ef4ea02\"", "is_server_owner": false, - "password": "$6$rounds=709593$ZV1v1LM8bM5wK5r5$O68BlmO3yf0bLX5gHK7vrvhAcck5PMH./A7FOaVkgl840xvAGX8ZRJJ.BDW2HqRP.olWFGKVO/hbw84R84ae90", - "self_link": "http://localhost:9001/3.0/users/12", "user_id": 12}'} + "\"ca92ce92be7bc92827a5295f67ebc3bb29e32afe\"", "is_server_owner": false, + "password": "$6$rounds=649364$KharsE48ZBcvV9zK$XfVHGRyCv8s63ubcGM7YbN2nKPV9x9RULhWJXF8d0VxHgVKqTQL25tMe2o8ua9Wz5TI4v3Reg5dUbOYB0sh4m1", + "self_link": "http://localhost:9001/3.0/users/84", "user_id": 84}'} headers: content-length: ['326'] content-type: [application/json; charset=utf-8] @@ -133,13 +133,13 @@ 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/84/addresses response: body: {string: !!python/unicode '{"entries": [{"email": "user@example.com", "http_etag": - "\"3038369cddc9208628cc60aa23f4805d14a75693\"", "original_email": "user@example.com", + "\"075a1242d2fc0128cbe4dc6bc827a24c1a2bdbd7\"", "original_email": "user@example.com", "registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/user@example.com", - "user": "http://localhost:9001/3.0/users/12", "verified_on": "2005-08-01T07:49:23"}], - "http_etag": "\"93aecb82eb7630061970ab7c3fea863f83fcc3be\"", "start": 0, "total_size": + "user": "http://localhost:9001/3.0/users/84", "verified_on": "2005-08-01T07:49:23"}], + "http_etag": "\"66ed8a5fe577da55fc26950e1370389410e08b86\"", "start": 0, "total_size": 1}'} headers: content-length: ['426'] @@ -153,9 +153,9 @@ uri: http://localhost:9001/3.0/users/user@example.com response: body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag": - "\"1f6fe4f5e1cca6aee94e40fbf61466954ef4ea02\"", "is_server_owner": false, - "password": "$6$rounds=709593$ZV1v1LM8bM5wK5r5$O68BlmO3yf0bLX5gHK7vrvhAcck5PMH./A7FOaVkgl840xvAGX8ZRJJ.BDW2HqRP.olWFGKVO/hbw84R84ae90", - "self_link": "http://localhost:9001/3.0/users/12", "user_id": 12}'} + "\"ca92ce92be7bc92827a5295f67ebc3bb29e32afe\"", "is_server_owner": false, + "password": "$6$rounds=649364$KharsE48ZBcvV9zK$XfVHGRyCv8s63ubcGM7YbN2nKPV9x9RULhWJXF8d0VxHgVKqTQL25tMe2o8ua9Wz5TI4v3Reg5dUbOYB0sh4m1", + "self_link": "http://localhost:9001/3.0/users/84", "user_id": 84}'} headers: content-length: ['326'] content-type: [application/json; charset=utf-8] @@ -165,10 +165,10 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode GET - uri: http://localhost:9001/3.0/users/12/preferences + uri: http://localhost:9001/3.0/users/84/preferences response: - body: {string: !!python/unicode '{"http_etag": "\"0348f12ac1733ee7db3ca21b11a27ba4317c27af\"", - "self_link": "http://localhost:9001/3.0/users/12/preferences"}'} + body: {string: !!python/unicode '{"http_etag": "\"97711445ef27ea098bc9c3844389742eb7ef850a\"", + "self_link": "http://localhost:9001/3.0/users/84/preferences"}'} headers: content-length: ['124'] content-type: [application/json; charset=utf-8] @@ -181,9 +181,9 @@ uri: http://localhost:9001/3.0/users/user@example.com response: body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag": - "\"1f6fe4f5e1cca6aee94e40fbf61466954ef4ea02\"", "is_server_owner": false, - "password": "$6$rounds=709593$ZV1v1LM8bM5wK5r5$O68BlmO3yf0bLX5gHK7vrvhAcck5PMH./A7FOaVkgl840xvAGX8ZRJJ.BDW2HqRP.olWFGKVO/hbw84R84ae90", - "self_link": "http://localhost:9001/3.0/users/12", "user_id": 12}'} + "\"ca92ce92be7bc92827a5295f67ebc3bb29e32afe\"", "is_server_owner": false, + "password": "$6$rounds=649364$KharsE48ZBcvV9zK$XfVHGRyCv8s63ubcGM7YbN2nKPV9x9RULhWJXF8d0VxHgVKqTQL25tMe2o8ua9Wz5TI4v3Reg5dUbOYB0sh4m1", + "self_link": "http://localhost:9001/3.0/users/84", "user_id": 84}'} headers: content-length: ['326'] content-type: [application/json; charset=utf-8] @@ -193,13 +193,13 @@ 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/84/addresses response: body: {string: !!python/unicode '{"entries": [{"email": "user@example.com", "http_etag": - "\"3038369cddc9208628cc60aa23f4805d14a75693\"", "original_email": "user@example.com", + "\"075a1242d2fc0128cbe4dc6bc827a24c1a2bdbd7\"", "original_email": "user@example.com", "registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/user@example.com", - "user": "http://localhost:9001/3.0/users/12", "verified_on": "2005-08-01T07:49:23"}], - "http_etag": "\"93aecb82eb7630061970ab7c3fea863f83fcc3be\"", "start": 0, "total_size": + "user": "http://localhost:9001/3.0/users/84", "verified_on": "2005-08-01T07:49:23"}], + "http_etag": "\"66ed8a5fe577da55fc26950e1370389410e08b86\"", "start": 0, "total_size": 1}'} headers: content-length: ['426'] @@ -228,9 +228,9 @@ uri: http://localhost:9001/3.0/users/user@example.com response: body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag": - "\"1f6fe4f5e1cca6aee94e40fbf61466954ef4ea02\"", "is_server_owner": false, - "password": "$6$rounds=709593$ZV1v1LM8bM5wK5r5$O68BlmO3yf0bLX5gHK7vrvhAcck5PMH./A7FOaVkgl840xvAGX8ZRJJ.BDW2HqRP.olWFGKVO/hbw84R84ae90", - "self_link": "http://localhost:9001/3.0/users/12", "user_id": 12}'} + "\"ca92ce92be7bc92827a5295f67ebc3bb29e32afe\"", "is_server_owner": false, + "password": "$6$rounds=649364$KharsE48ZBcvV9zK$XfVHGRyCv8s63ubcGM7YbN2nKPV9x9RULhWJXF8d0VxHgVKqTQL25tMe2o8ua9Wz5TI4v3Reg5dUbOYB0sh4m1", + "self_link": "http://localhost:9001/3.0/users/84", "user_id": 84}'} headers: content-length: ['326'] content-type: [application/json; charset=utf-8] @@ -240,13 +240,13 @@ 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/84/addresses response: body: {string: !!python/unicode '{"entries": [{"email": "user@example.com", "http_etag": - "\"3038369cddc9208628cc60aa23f4805d14a75693\"", "original_email": "user@example.com", + "\"075a1242d2fc0128cbe4dc6bc827a24c1a2bdbd7\"", "original_email": "user@example.com", "registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/user@example.com", - "user": "http://localhost:9001/3.0/users/12", "verified_on": "2005-08-01T07:49:23"}], - "http_etag": "\"93aecb82eb7630061970ab7c3fea863f83fcc3be\"", "start": 0, "total_size": + "user": "http://localhost:9001/3.0/users/84", "verified_on": "2005-08-01T07:49:23"}], + "http_etag": "\"66ed8a5fe577da55fc26950e1370389410e08b86\"", "start": 0, "total_size": 1}'} headers: content-length: ['426'] @@ -261,13 +261,13 @@ uri: http://localhost:9001/3.0/members/find response: body: {string: !!python/unicode '{"entries": [{"address": "http://localhost:9001/3.0/addresses/user@example.com", - "delivery_mode": "regular", "email": "user@example.com", "http_etag": "\"c105bc408c3606eae5c5b1a95662118d02075bb2\"", - "list_id": "foo.example.com", "member_id": 83, "moderation_action": "defer", - "role": "member", "self_link": "http://localhost:9001/3.0/members/83", "user": - "http://localhost:9001/3.0/users/12"}], "http_etag": "\"2c52c8dfb0c760db73bf033ee05598396c85dfc3\"", - "start": 0, "total_size": 1}'} + "delivery_mode": "regular", "email": "user@example.com", "http_etag": "\"c144b2b9918da23553a467ea1d14a6b220063d8e\"", + "list_id": "foo.example.com", "member_id": 83, "role": "member", "self_link": + "http://localhost:9001/3.0/members/83", "user": "http://localhost:9001/3.0/users/84"}], + "http_etag": "\"9219402bf2d74180c98ccdb01bbb998907e20679\"", "start": 0, "total_size": + 1}'} headers: - content-length: ['484'] + content-length: ['454'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -291,9 +291,9 @@ uri: http://localhost:9001/3.0/users/user@example.com response: body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag": - "\"1f6fe4f5e1cca6aee94e40fbf61466954ef4ea02\"", "is_server_owner": false, - "password": "$6$rounds=709593$ZV1v1LM8bM5wK5r5$O68BlmO3yf0bLX5gHK7vrvhAcck5PMH./A7FOaVkgl840xvAGX8ZRJJ.BDW2HqRP.olWFGKVO/hbw84R84ae90", - "self_link": "http://localhost:9001/3.0/users/12", "user_id": 12}'} + "\"ca92ce92be7bc92827a5295f67ebc3bb29e32afe\"", "is_server_owner": false, + "password": "$6$rounds=649364$KharsE48ZBcvV9zK$XfVHGRyCv8s63ubcGM7YbN2nKPV9x9RULhWJXF8d0VxHgVKqTQL25tMe2o8ua9Wz5TI4v3Reg5dUbOYB0sh4m1", + "self_link": "http://localhost:9001/3.0/users/84", "user_id": 84}'} headers: content-length: ['326'] content-type: [application/json; charset=utf-8] @@ -303,13 +303,13 @@ 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/84/addresses response: body: {string: !!python/unicode '{"entries": [{"email": "user@example.com", "http_etag": - "\"3038369cddc9208628cc60aa23f4805d14a75693\"", "original_email": "user@example.com", + "\"075a1242d2fc0128cbe4dc6bc827a24c1a2bdbd7\"", "original_email": "user@example.com", "registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/user@example.com", - "user": "http://localhost:9001/3.0/users/12", "verified_on": "2005-08-01T07:49:23"}], - "http_etag": "\"93aecb82eb7630061970ab7c3fea863f83fcc3be\"", "start": 0, "total_size": + "user": "http://localhost:9001/3.0/users/84", "verified_on": "2005-08-01T07:49:23"}], + "http_etag": "\"66ed8a5fe577da55fc26950e1370389410e08b86\"", "start": 0, "total_size": 1}'} headers: content-length: ['426'] @@ -323,9 +323,9 @@ uri: http://localhost:9001/3.0/users/user@example.com response: body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag": - "\"1f6fe4f5e1cca6aee94e40fbf61466954ef4ea02\"", "is_server_owner": false, - "password": "$6$rounds=709593$ZV1v1LM8bM5wK5r5$O68BlmO3yf0bLX5gHK7vrvhAcck5PMH./A7FOaVkgl840xvAGX8ZRJJ.BDW2HqRP.olWFGKVO/hbw84R84ae90", - "self_link": "http://localhost:9001/3.0/users/12", "user_id": 12}'} + "\"ca92ce92be7bc92827a5295f67ebc3bb29e32afe\"", "is_server_owner": false, + "password": "$6$rounds=649364$KharsE48ZBcvV9zK$XfVHGRyCv8s63ubcGM7YbN2nKPV9x9RULhWJXF8d0VxHgVKqTQL25tMe2o8ua9Wz5TI4v3Reg5dUbOYB0sh4m1", + "self_link": "http://localhost:9001/3.0/users/84", "user_id": 84}'} headers: content-length: ['326'] content-type: [application/json; charset=utf-8] @@ -335,13 +335,13 @@ 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/84/addresses response: body: {string: !!python/unicode '{"entries": [{"email": "user@example.com", "http_etag": - "\"3038369cddc9208628cc60aa23f4805d14a75693\"", "original_email": "user@example.com", + "\"075a1242d2fc0128cbe4dc6bc827a24c1a2bdbd7\"", "original_email": "user@example.com", "registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/user@example.com", - "user": "http://localhost:9001/3.0/users/12", "verified_on": "2005-08-01T07:49:23"}], - "http_etag": "\"93aecb82eb7630061970ab7c3fea863f83fcc3be\"", "start": 0, "total_size": + "user": "http://localhost:9001/3.0/users/84", "verified_on": "2005-08-01T07:49:23"}], + "http_etag": "\"66ed8a5fe577da55fc26950e1370389410e08b86\"", "start": 0, "total_size": 1}'} headers: content-length: ['426'] @@ -355,9 +355,9 @@ uri: http://localhost:9001/3.0/users/user@example.com response: body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag": - "\"1f6fe4f5e1cca6aee94e40fbf61466954ef4ea02\"", "is_server_owner": false, - "password": "$6$rounds=709593$ZV1v1LM8bM5wK5r5$O68BlmO3yf0bLX5gHK7vrvhAcck5PMH./A7FOaVkgl840xvAGX8ZRJJ.BDW2HqRP.olWFGKVO/hbw84R84ae90", - "self_link": "http://localhost:9001/3.0/users/12", "user_id": 12}'} + "\"ca92ce92be7bc92827a5295f67ebc3bb29e32afe\"", "is_server_owner": false, + "password": "$6$rounds=649364$KharsE48ZBcvV9zK$XfVHGRyCv8s63ubcGM7YbN2nKPV9x9RULhWJXF8d0VxHgVKqTQL25tMe2o8ua9Wz5TI4v3Reg5dUbOYB0sh4m1", + "self_link": "http://localhost:9001/3.0/users/84", "user_id": 84}'} headers: content-length: ['326'] content-type: [application/json; charset=utf-8] @@ -367,13 +367,13 @@ 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/84/addresses response: body: {string: !!python/unicode '{"entries": [{"email": "user@example.com", "http_etag": - "\"3038369cddc9208628cc60aa23f4805d14a75693\"", "original_email": "user@example.com", + "\"075a1242d2fc0128cbe4dc6bc827a24c1a2bdbd7\"", "original_email": "user@example.com", "registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/user@example.com", - "user": "http://localhost:9001/3.0/users/12", "verified_on": "2005-08-01T07:49:23"}], - "http_etag": "\"93aecb82eb7630061970ab7c3fea863f83fcc3be\"", "start": 0, "total_size": + "user": "http://localhost:9001/3.0/users/84", "verified_on": "2005-08-01T07:49:23"}], + "http_etag": "\"66ed8a5fe577da55fc26950e1370389410e08b86\"", "start": 0, "total_size": 1}'} headers: content-length: ['426'] @@ -400,9 +400,9 @@ uri: http://localhost:9001/3.0/users/user@example.com response: body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag": - "\"1f6fe4f5e1cca6aee94e40fbf61466954ef4ea02\"", "is_server_owner": false, - "password": "$6$rounds=709593$ZV1v1LM8bM5wK5r5$O68BlmO3yf0bLX5gHK7vrvhAcck5PMH./A7FOaVkgl840xvAGX8ZRJJ.BDW2HqRP.olWFGKVO/hbw84R84ae90", - "self_link": "http://localhost:9001/3.0/users/12", "user_id": 12}'} + "\"ca92ce92be7bc92827a5295f67ebc3bb29e32afe\"", "is_server_owner": false, + "password": "$6$rounds=649364$KharsE48ZBcvV9zK$XfVHGRyCv8s63ubcGM7YbN2nKPV9x9RULhWJXF8d0VxHgVKqTQL25tMe2o8ua9Wz5TI4v3Reg5dUbOYB0sh4m1", + "self_link": "http://localhost:9001/3.0/users/84", "user_id": 84}'} headers: content-length: ['326'] content-type: [application/json; charset=utf-8] @@ -412,13 +412,13 @@ 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/84/addresses response: body: {string: !!python/unicode '{"entries": [{"email": "user@example.com", "http_etag": - "\"3038369cddc9208628cc60aa23f4805d14a75693\"", "original_email": "user@example.com", + "\"075a1242d2fc0128cbe4dc6bc827a24c1a2bdbd7\"", "original_email": "user@example.com", "registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/user@example.com", - "user": "http://localhost:9001/3.0/users/12", "verified_on": "2005-08-01T07:49:23"}], - "http_etag": "\"93aecb82eb7630061970ab7c3fea863f83fcc3be\"", "start": 0, "total_size": + "user": "http://localhost:9001/3.0/users/84", "verified_on": "2005-08-01T07:49:23"}], + "http_etag": "\"66ed8a5fe577da55fc26950e1370389410e08b86\"", "start": 0, "total_size": 1}'} headers: content-length: ['426'] @@ -432,9 +432,9 @@ uri: http://localhost:9001/3.0/users/user@example.com response: body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag": - "\"1f6fe4f5e1cca6aee94e40fbf61466954ef4ea02\"", "is_server_owner": false, - "password": "$6$rounds=709593$ZV1v1LM8bM5wK5r5$O68BlmO3yf0bLX5gHK7vrvhAcck5PMH./A7FOaVkgl840xvAGX8ZRJJ.BDW2HqRP.olWFGKVO/hbw84R84ae90", - "self_link": "http://localhost:9001/3.0/users/12", "user_id": 12}'} + "\"ca92ce92be7bc92827a5295f67ebc3bb29e32afe\"", "is_server_owner": false, + "password": "$6$rounds=649364$KharsE48ZBcvV9zK$XfVHGRyCv8s63ubcGM7YbN2nKPV9x9RULhWJXF8d0VxHgVKqTQL25tMe2o8ua9Wz5TI4v3Reg5dUbOYB0sh4m1", + "self_link": "http://localhost:9001/3.0/users/84", "user_id": 84}'} headers: content-length: ['326'] content-type: [application/json; charset=utf-8] @@ -444,13 +444,13 @@ 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/84/addresses response: body: {string: !!python/unicode '{"entries": [{"email": "user@example.com", "http_etag": - "\"3038369cddc9208628cc60aa23f4805d14a75693\"", "original_email": "user@example.com", + "\"075a1242d2fc0128cbe4dc6bc827a24c1a2bdbd7\"", "original_email": "user@example.com", "registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/user@example.com", - "user": "http://localhost:9001/3.0/users/12", "verified_on": "2005-08-01T07:49:23"}], - "http_etag": "\"93aecb82eb7630061970ab7c3fea863f83fcc3be\"", "start": 0, "total_size": + "user": "http://localhost:9001/3.0/users/84", "verified_on": "2005-08-01T07:49:23"}], + "http_etag": "\"66ed8a5fe577da55fc26950e1370389410e08b86\"", "start": 0, "total_size": 1}'} headers: content-length: ['426'] @@ -461,13 +461,13 @@ 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/84/addresses response: body: {string: !!python/unicode '{"entries": [{"email": "user@example.com", "http_etag": - "\"3038369cddc9208628cc60aa23f4805d14a75693\"", "original_email": "user@example.com", + "\"075a1242d2fc0128cbe4dc6bc827a24c1a2bdbd7\"", "original_email": "user@example.com", "registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/user@example.com", - "user": "http://localhost:9001/3.0/users/12", "verified_on": "2005-08-01T07:49:23"}], - "http_etag": "\"93aecb82eb7630061970ab7c3fea863f83fcc3be\"", "start": 0, "total_size": + "user": "http://localhost:9001/3.0/users/84", "verified_on": "2005-08-01T07:49:23"}], + "http_etag": "\"66ed8a5fe577da55fc26950e1370389410e08b86\"", "start": 0, "total_size": 1}'} headers: content-length: ['426'] @@ -482,13 +482,13 @@ uri: http://localhost:9001/3.0/members/find response: body: {string: !!python/unicode '{"entries": [{"address": "http://localhost:9001/3.0/addresses/user@example.com", - "delivery_mode": "regular", "email": "user@example.com", "http_etag": "\"c105bc408c3606eae5c5b1a95662118d02075bb2\"", - "list_id": "foo.example.com", "member_id": 83, "moderation_action": "defer", - "role": "member", "self_link": "http://localhost:9001/3.0/members/83", "user": - "http://localhost:9001/3.0/users/12"}], "http_etag": "\"2c52c8dfb0c760db73bf033ee05598396c85dfc3\"", - "start": 0, "total_size": 1}'} + "delivery_mode": "regular", "email": "user@example.com", "http_etag": "\"c144b2b9918da23553a467ea1d14a6b220063d8e\"", + "list_id": "foo.example.com", "member_id": 83, "role": "member", "self_link": + "http://localhost:9001/3.0/members/83", "user": "http://localhost:9001/3.0/users/84"}], + "http_etag": "\"9219402bf2d74180c98ccdb01bbb998907e20679\"", "start": 0, "total_size": + 1}'} headers: - content-length: ['484'] + content-length: ['454'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -508,24 +508,18 @@ body: null headers: accept-encoding: ['gzip, deflate'] - method: !!python/unicode DELETE - uri: http://localhost:9001/3.0/lists/foo@example.com + method: !!python/unicode GET + uri: http://localhost:9001/3.0/domains response: - body: {string: !!python/unicode ''} + body: {string: !!python/unicode '{"entries": [{"base_url": "http://example.com", + "description": null, "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", + "mail_host": "example.com", "self_link": "http://localhost:9001/3.0/domains/example.com", + "url_host": "example.com"}], "http_etag": "\"c385b155f8da284bf78dbe075e20f58a30c893ab\"", + "start": 0, "total_size": 1}'} 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/12 - response: - body: {string: !!python/unicode ''} - headers: - content-length: ['0'] - status: {code: 204, message: No Content} + content-length: ['338'] + content-type: [application/json; charset=utf-8] + status: {code: 200, message: OK} - request: body: null headers: @@ -537,4 +531,32 @@ 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 + response: + body: {string: !!python/unicode '{"entries": [{"created_on": "2005-08-01T07:49:23", + "http_etag": "\"ca92ce92be7bc92827a5295f67ebc3bb29e32afe\"", "is_server_owner": + false, "password": "$6$rounds=649364$KharsE48ZBcvV9zK$XfVHGRyCv8s63ubcGM7YbN2nKPV9x9RULhWJXF8d0VxHgVKqTQL25tMe2o8ua9Wz5TI4v3Reg5dUbOYB0sh4m1", + "self_link": "http://localhost:9001/3.0/users/84", "user_id": 84}], "http_etag": + "\"bb3168845ec64ad1ce77f73a695b46daaed6bffd\"", "start": 0, "total_size": + 1}'} + headers: + content-length: ['431'] + 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/84 + response: + body: {string: !!python/unicode ''} + headers: + content-length: ['0'] + status: {code: 204, message: No Content} version: 1 diff --git a/src/postorius/tests/fixtures/vcr_cassettes/MailmanUserTest.test_subscriptions_logged_in.yaml b/src/postorius/tests/fixtures/vcr_cassettes/MailmanUserTest.test_subscriptions_logged_in.yaml index 158b020..3254b54 100644 --- a/src/postorius/tests/fixtures/vcr_cassettes/MailmanUserTest.test_subscriptions_logged_in.yaml +++ b/src/postorius/tests/fixtures/vcr_cassettes/MailmanUserTest.test_subscriptions_logged_in.yaml @@ -51,7 +51,7 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - location: ['http://localhost:9001/3.0/users/13'] + location: ['http://localhost:9001/3.0/users/85'] status: {code: 201, message: Created} - request: body: null @@ -61,9 +61,9 @@ uri: http://localhost:9001/3.0/users/user@example.com response: body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag": - "\"94bb2c6f163de817075a33d21d25b6340aaf5aff\"", "is_server_owner": false, - "password": "$6$rounds=610217$w3NDgCqk8l6rbWcm$0feuMIANhuhKxFnFionCzxpIrepP2O/vGw9jdNrQ5if8TpqDhwGdtQhEFX2D0aFhNQiAbA3x1ID0HQZAfnW5o.", - "self_link": "http://localhost:9001/3.0/users/13", "user_id": 13}'} + "\"f24ebef895bea0c55d1683e193510ef846ad3ab0\"", "is_server_owner": false, + "password": "$6$rounds=717704$ALeVemCJMbsHZRDE$oJEZ9jozfSrbwaReLLJ/5LjZcSo.PZawYGu5w6bz1ZABuWJ68OhoIokMaShg1BjHVB8pSN1Vm2d0NZ84mu5Z4/", + "self_link": "http://localhost:9001/3.0/users/85", "user_id": 85}'} headers: content-length: ['326'] content-type: [application/json; charset=utf-8] @@ -73,12 +73,12 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode GET - uri: http://localhost:9001/3.0/users/13/addresses + uri: http://localhost:9001/3.0/users/85/addresses response: body: {string: !!python/unicode '{"entries": [{"email": "user@example.com", "http_etag": - "\"a441e07d0f434e4d1675e34718ac333ef14c4315\"", "original_email": "user@example.com", + "\"db6ff297de3068bd870396233ac52209a2094046\"", "original_email": "user@example.com", "registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/user@example.com", - "user": "http://localhost:9001/3.0/users/13"}], "http_etag": "\"b0b4c393d7c537552bbe7c0ad164194a5d0ab347\"", + "user": "http://localhost:9001/3.0/users/85"}], "http_etag": "\"0c3730304a8ec8a30231839a73ddf332278e5512\"", "start": 0, "total_size": 1}'} headers: content-length: ['388'] @@ -92,9 +92,9 @@ uri: http://localhost:9001/3.0/users/user@example.com response: body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag": - "\"94bb2c6f163de817075a33d21d25b6340aaf5aff\"", "is_server_owner": false, - "password": "$6$rounds=610217$w3NDgCqk8l6rbWcm$0feuMIANhuhKxFnFionCzxpIrepP2O/vGw9jdNrQ5if8TpqDhwGdtQhEFX2D0aFhNQiAbA3x1ID0HQZAfnW5o.", - "self_link": "http://localhost:9001/3.0/users/13", "user_id": 13}'} + "\"f24ebef895bea0c55d1683e193510ef846ad3ab0\"", "is_server_owner": false, + "password": "$6$rounds=717704$ALeVemCJMbsHZRDE$oJEZ9jozfSrbwaReLLJ/5LjZcSo.PZawYGu5w6bz1ZABuWJ68OhoIokMaShg1BjHVB8pSN1Vm2d0NZ84mu5Z4/", + "self_link": "http://localhost:9001/3.0/users/85", "user_id": 85}'} headers: content-length: ['326'] content-type: [application/json; charset=utf-8] @@ -104,12 +104,12 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode GET - uri: http://localhost:9001/3.0/users/13/addresses + uri: http://localhost:9001/3.0/users/85/addresses response: body: {string: !!python/unicode '{"entries": [{"email": "user@example.com", "http_etag": - "\"a441e07d0f434e4d1675e34718ac333ef14c4315\"", "original_email": "user@example.com", + "\"db6ff297de3068bd870396233ac52209a2094046\"", "original_email": "user@example.com", "registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/user@example.com", - "user": "http://localhost:9001/3.0/users/13"}], "http_etag": "\"b0b4c393d7c537552bbe7c0ad164194a5d0ab347\"", + "user": "http://localhost:9001/3.0/users/85"}], "http_etag": "\"0c3730304a8ec8a30231839a73ddf332278e5512\"", "start": 0, "total_size": 1}'} headers: content-length: ['388'] @@ -134,14 +134,15 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode GET - uri: http://localhost:9001/3.0/lists/foo.example.com + uri: http://localhost:9001/3.0/domains 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}'} + body: {string: !!python/unicode '{"entries": [{"base_url": "http://example.com", + "description": null, "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", + "mail_host": "example.com", "self_link": "http://localhost:9001/3.0/domains/example.com", + "url_host": "example.com"}], "http_etag": "\"c385b155f8da284bf78dbe075e20f58a30c893ab\"", + "start": 0, "total_size": 1}'} headers: - content-length: ['294'] + content-length: ['338'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -149,32 +150,38 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode DELETE - uri: http://localhost:9001/3.0/lists/foo@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/users/13 - 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/domains/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 + response: + body: {string: !!python/unicode '{"entries": [{"created_on": "2005-08-01T07:49:23", + "http_etag": "\"f24ebef895bea0c55d1683e193510ef846ad3ab0\"", "is_server_owner": + false, "password": "$6$rounds=717704$ALeVemCJMbsHZRDE$oJEZ9jozfSrbwaReLLJ/5LjZcSo.PZawYGu5w6bz1ZABuWJ68OhoIokMaShg1BjHVB8pSN1Vm2d0NZ84mu5Z4/", + "self_link": "http://localhost:9001/3.0/users/85", "user_id": 85}], "http_etag": + "\"15140a9c3d4feec5fcddb8053f8527db829da5b6\"", "start": 0, "total_size": + 1}'} + headers: + content-length: ['431'] + 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/85 + response: + body: {string: !!python/unicode ''} + headers: + content-length: ['0'] + status: {code: 204, message: No Content} version: 1 diff --git a/src/postorius/tests/fixtures/vcr_cassettes/MailmanUserTest.test_subscriptions_no_mailman_user.yaml b/src/postorius/tests/fixtures/vcr_cassettes/MailmanUserTest.test_subscriptions_no_mailman_user.yaml index c61009a..852667a 100644 --- a/src/postorius/tests/fixtures/vcr_cassettes/MailmanUserTest.test_subscriptions_no_mailman_user.yaml +++ b/src/postorius/tests/fixtures/vcr_cassettes/MailmanUserTest.test_subscriptions_no_mailman_user.yaml @@ -51,7 +51,7 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - location: ['http://localhost:9001/3.0/users/14'] + location: ['http://localhost:9001/3.0/users/86'] status: {code: 201, message: Created} - request: body: null @@ -100,19 +100,19 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - location: ['http://localhost:9001/3.0/users/15'] + location: ['http://localhost:9001/3.0/users/87'] status: {code: 201, message: Created} - request: body: null headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode GET - uri: http://localhost:9001/3.0/users/15 + uri: http://localhost:9001/3.0/users/87 response: body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag": - "\"df1da5b04076c5742af3a45b43556e1e65edf5b5\"", "is_server_owner": false, - "password": "$6$rounds=594149$iGGXb1VEgzLDhh4x$.LV0R92nkWZ4wJwno0HGVPpwAQARAb21jlEJSNG/WySi6rGJySJBAx5Iazjg993wAZ8TVrKOWisE8ecPRrvXL/", - "self_link": "http://localhost:9001/3.0/users/15", "user_id": 15}'} + "\"9673f4ac6062927aff92caf7175e4dc946554ebe\"", "is_server_owner": false, + "password": "$6$rounds=712335$WUQ6J3kH7Beb54ST$yPJ3/EMqwu.fZLQuspg5DA5QZ1dOcCW1CO934bGCg/XiURACX2Awm00tx4Ge3Zwk0s7wXgLqrBRZU9lsUPiyx/", + "self_link": "http://localhost:9001/3.0/users/87", "user_id": 87}'} headers: content-length: ['326'] content-type: [application/json; charset=utf-8] @@ -122,13 +122,13 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode GET - uri: http://localhost:9001/3.0/users/15/addresses + uri: http://localhost:9001/3.0/users/87/addresses response: body: {string: !!python/unicode '{"entries": [{"email": "old-user@example.com", - "http_etag": "\"891d821e9d1d30a14842364478a230b9bee84548\"", "original_email": + "http_etag": "\"82a2767c8af16328c709fe298b0578df85033307\"", "original_email": "old-user@example.com", "registered_on": "2005-08-01T07:49:23", "self_link": - "http://localhost:9001/3.0/addresses/old-user@example.com", "user": "http://localhost:9001/3.0/users/15"}], - "http_etag": "\"5a498dfae46744afde74f7a282f9c17d8fbfd256\"", "start": 0, "total_size": + "http://localhost:9001/3.0/addresses/old-user@example.com", "user": "http://localhost:9001/3.0/users/87"}], + "http_etag": "\"fe933ade9a299d8fcc8b1d28088f87528e21c335\"", "start": 0, "total_size": 1}'} headers: content-length: ['400'] @@ -156,9 +156,9 @@ uri: http://localhost:9001/3.0/users/old-user@example.com response: body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag": - "\"df1da5b04076c5742af3a45b43556e1e65edf5b5\"", "is_server_owner": false, - "password": "$6$rounds=594149$iGGXb1VEgzLDhh4x$.LV0R92nkWZ4wJwno0HGVPpwAQARAb21jlEJSNG/WySi6rGJySJBAx5Iazjg993wAZ8TVrKOWisE8ecPRrvXL/", - "self_link": "http://localhost:9001/3.0/users/15", "user_id": 15}'} + "\"9673f4ac6062927aff92caf7175e4dc946554ebe\"", "is_server_owner": false, + "password": "$6$rounds=712335$WUQ6J3kH7Beb54ST$yPJ3/EMqwu.fZLQuspg5DA5QZ1dOcCW1CO934bGCg/XiURACX2Awm00tx4Ge3Zwk0s7wXgLqrBRZU9lsUPiyx/", + "self_link": "http://localhost:9001/3.0/users/87", "user_id": 87}'} headers: content-length: ['326'] content-type: [application/json; charset=utf-8] @@ -168,14 +168,15 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode GET - uri: http://localhost:9001/3.0/lists/foo.example.com + uri: http://localhost:9001/3.0/domains 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}'} + body: {string: !!python/unicode '{"entries": [{"base_url": "http://example.com", + "description": null, "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", + "mail_host": "example.com", "self_link": "http://localhost:9001/3.0/domains/example.com", + "url_host": "example.com"}], "http_etag": "\"c385b155f8da284bf78dbe075e20f58a30c893ab\"", + "start": 0, "total_size": 1}'} headers: - content-length: ['294'] + content-length: ['338'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -183,32 +184,52 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode DELETE - uri: http://localhost:9001/3.0/lists/foo@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/users/14 - 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/domains/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 + response: + body: {string: !!python/unicode '{"entries": [{"created_on": "2005-08-01T07:49:23", + "http_etag": "\"90a7775ce62cd94b3fe990f53ec4e3aa037d6e7c\"", "is_server_owner": + false, "password": "$6$rounds=669630$HRY4iepO3GcdHiis$17VVsa9cwTjb8fsofal7AaMdDssba.fs4cylj02EM/6c65xC8yt9UbCNQP4ujam.YcrA9Tx0EYDBVg75hh/Bf.", + "self_link": "http://localhost:9001/3.0/users/86", "user_id": 86}, {"created_on": + "2005-08-01T07:49:23", "http_etag": "\"9673f4ac6062927aff92caf7175e4dc946554ebe\"", + "is_server_owner": false, "password": "$6$rounds=712335$WUQ6J3kH7Beb54ST$yPJ3/EMqwu.fZLQuspg5DA5QZ1dOcCW1CO934bGCg/XiURACX2Awm00tx4Ge3Zwk0s7wXgLqrBRZU9lsUPiyx/", + "self_link": "http://localhost:9001/3.0/users/87", "user_id": 87}], "http_etag": + "\"5aa5297db906d67060025694a61286148857dd73\"", "start": 0, "total_size": + 2}'} + headers: + content-length: ['759'] + 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/86 + 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/87 + response: + body: {string: !!python/unicode ''} + headers: + content-length: ['0'] + status: {code: 204, message: No Content} version: 1 diff --git a/src/postorius/tests/fixtures/vcr_cassettes/MailmanUserTest.test_subscriptions_not_logged_in.yaml b/src/postorius/tests/fixtures/vcr_cassettes/MailmanUserTest.test_subscriptions_not_logged_in.yaml index 4f3f619..0d198e7 100644 --- a/src/postorius/tests/fixtures/vcr_cassettes/MailmanUserTest.test_subscriptions_not_logged_in.yaml +++ b/src/postorius/tests/fixtures/vcr_cassettes/MailmanUserTest.test_subscriptions_not_logged_in.yaml @@ -51,21 +51,22 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - location: ['http://localhost:9001/3.0/users/16'] + location: ['http://localhost:9001/3.0/users/88'] status: {code: 201, message: Created} - request: body: null headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode GET - uri: http://localhost:9001/3.0/lists/foo.example.com + uri: http://localhost:9001/3.0/domains 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}'} + body: {string: !!python/unicode '{"entries": [{"base_url": "http://example.com", + "description": null, "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", + "mail_host": "example.com", "self_link": "http://localhost:9001/3.0/domains/example.com", + "url_host": "example.com"}], "http_etag": "\"c385b155f8da284bf78dbe075e20f58a30c893ab\"", + "start": 0, "total_size": 1}'} headers: - content-length: ['294'] + content-length: ['338'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -73,32 +74,38 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode DELETE - uri: http://localhost:9001/3.0/lists/foo@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/users/16 - 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/domains/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 + response: + body: {string: !!python/unicode '{"entries": [{"created_on": "2005-08-01T07:49:23", + "http_etag": "\"7f234b398a2dfa81588572dcf8fc829a626f4951\"", "is_server_owner": + false, "password": "$6$rounds=648420$Ce6dYLRktslAr6Hl$mZ5AsqEllc2qeFyZhYR.BD5nXpUCuaIFpVn8Ok/LM9h/WdjdciKFRvHfhIx9ANM2d5ZX24rU1bFVeVgXoCLii/", + "self_link": "http://localhost:9001/3.0/users/88", "user_id": 88}], "http_etag": + "\"aca9ecb8fc5a712c72730b3e987dfaf575380fd9\"", "start": 0, "total_size": + 1}'} + headers: + content-length: ['431'] + 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/88 + response: + body: {string: !!python/unicode ''} + headers: + content-length: ['0'] + status: {code: 204, message: No Content} version: 1 diff --git a/src/postorius/tests/fixtures/vcr_cassettes/ModelTest.test_mailman_user_created_when_flag_is_on.yaml b/src/postorius/tests/fixtures/vcr_cassettes/ModelTest.test_mailman_user_created_when_flag_is_on.yaml index 17c2fd1..baac30a 100644 --- a/src/postorius/tests/fixtures/vcr_cassettes/ModelTest.test_mailman_user_created_when_flag_is_on.yaml +++ b/src/postorius/tests/fixtures/vcr_cassettes/ModelTest.test_mailman_user_created_when_flag_is_on.yaml @@ -51,7 +51,7 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - location: ['http://localhost:9001/3.0/users/28'] + location: ['http://localhost:9001/3.0/users/108'] status: {code: 201, message: Created} - request: body: null @@ -61,11 +61,11 @@ uri: http://localhost:9001/3.0/users/test@example.com response: body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag": - "\"90134bf422a17dfbfafee0f676aa1c59debfeb7a\"", "is_server_owner": false, - "password": "$6$rounds=704330$/Y7u5S4Znv5KAuPj$a9K03yXZlBp5Z/ZIoYfWNcDKbCqZpmC3kw/xPZ/cV3StGDJDnOEcCnwLGWuT.bUfUdfoCdtfqMwHH6AlIKwuD/", - "self_link": "http://localhost:9001/3.0/users/28", "user_id": 28}'} + "\"d31eff1c8c0fa99c90d2089db31f1bde7e5c8b82\"", "is_server_owner": false, + "password": "$6$rounds=677845$q86bGf8NDmn9SmUU$hovQHgCNuXpd.W2upS.8FmOeiyIO9fUgWBGm3jRZKt4jkKVRmeG1RFhCZn/0keoR.E5KZuT/JT3qOeBuOMzMn0", + "self_link": "http://localhost:9001/3.0/users/108", "user_id": 108}'} headers: - content-length: ['326'] + content-length: ['328'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -73,15 +73,15 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode GET - uri: http://localhost:9001/3.0/users/28/addresses + uri: http://localhost:9001/3.0/users/108/addresses response: body: {string: !!python/unicode '{"entries": [{"email": "test@example.com", "http_etag": - "\"67e3922e373606bd5d46cb05948e58253d57c8af\"", "original_email": "test@example.com", + "\"c21aeb81fbc6810cf55344d3c097899e1dc45b7d\"", "original_email": "test@example.com", "registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/test@example.com", - "user": "http://localhost:9001/3.0/users/28"}], "http_etag": "\"751a7a84aa9ac749c6933cebb02b0b4d89ab0cc7\"", + "user": "http://localhost:9001/3.0/users/108"}], "http_etag": "\"eefd141b35eac017cb6ac27ba378aec7e1011f13\"", "start": 0, "total_size": 1}'} headers: - content-length: ['388'] + content-length: ['389'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -89,16 +89,15 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode GET - uri: http://localhost:9001/3.0/lists + uri: http://localhost:9001/3.0/domains response: - body: {string: !!python/unicode '{"entries": [{"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}], "http_etag": "\"0eb6d0b88c89b5c491b7966eab97a79e221096ad\"", + body: {string: !!python/unicode '{"entries": [{"base_url": "http://example.com", + "description": null, "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", + "mail_host": "example.com", "self_link": "http://localhost:9001/3.0/domains/example.com", + "url_host": "example.com"}], "http_etag": "\"c385b155f8da284bf78dbe075e20f58a30c893ab\"", "start": 0, "total_size": 1}'} headers: - content-length: ['399'] + content-length: ['338'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -106,7 +105,7 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode DELETE - uri: http://localhost:9001/3.0/lists/foo@example.com + uri: http://localhost:9001/3.0/domains/example.com response: body: {string: !!python/unicode ''} headers: @@ -120,19 +119,13 @@ uri: http://localhost:9001/3.0/users response: body: {string: !!python/unicode '{"entries": [{"created_on": "2005-08-01T07:49:23", - "http_etag": "\"0c3f6e8712fd05b9da49c42bf9600a5414b7958f\"", "is_server_owner": - false, "self_link": "http://localhost:9001/3.0/users/25", "user_id": 25}, - {"created_on": "2005-08-01T07:49:23", "http_etag": "\"c73be856843a113d5eb32f60ae4315192adb1045\"", - "is_server_owner": false, "self_link": "http://localhost:9001/3.0/users/26", - "user_id": 26}, {"created_on": "2005-08-01T07:49:23", "http_etag": "\"1479b23f4b3c2af04f98946e313297006dd20754\"", - "is_server_owner": false, "self_link": "http://localhost:9001/3.0/users/27", - "user_id": 27}, {"created_on": "2005-08-01T07:49:23", "http_etag": "\"90134bf422a17dfbfafee0f676aa1c59debfeb7a\"", - "is_server_owner": false, "password": "$6$rounds=704330$/Y7u5S4Znv5KAuPj$a9K03yXZlBp5Z/ZIoYfWNcDKbCqZpmC3kw/xPZ/cV3StGDJDnOEcCnwLGWuT.bUfUdfoCdtfqMwHH6AlIKwuD/", - "self_link": "http://localhost:9001/3.0/users/28", "user_id": 28}], "http_etag": - "\"2dbdcc04c5a4a0c1d074060abd09213376b7f77a\"", "start": 0, "total_size": - 4}'} + "http_etag": "\"d31eff1c8c0fa99c90d2089db31f1bde7e5c8b82\"", "is_server_owner": + false, "password": "$6$rounds=677845$q86bGf8NDmn9SmUU$hovQHgCNuXpd.W2upS.8FmOeiyIO9fUgWBGm3jRZKt4jkKVRmeG1RFhCZn/0keoR.E5KZuT/JT3qOeBuOMzMn0", + "self_link": "http://localhost:9001/3.0/users/108", "user_id": 108}], "http_etag": + "\"61a593e1e6dbf3065f1a7c52553ce0fd1b8128f7\"", "start": 0, "total_size": + 1}'} headers: - content-length: ['1007'] + content-length: ['433'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -140,51 +133,7 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode DELETE - uri: http://localhost:9001/3.0/users/25 - 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/26 - 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/27 - 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/28 - 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/domains/example.com + uri: http://localhost:9001/3.0/users/108 response: body: {string: !!python/unicode ''} headers: diff --git a/src/postorius/tests/fixtures/vcr_cassettes/ModelTest.test_mailman_user_not_created_when_flag_is_off.yaml b/src/postorius/tests/fixtures/vcr_cassettes/ModelTest.test_mailman_user_not_created_when_flag_is_off.yaml index fe4415f..2f28697 100644 --- a/src/postorius/tests/fixtures/vcr_cassettes/ModelTest.test_mailman_user_not_created_when_flag_is_off.yaml +++ b/src/postorius/tests/fixtures/vcr_cassettes/ModelTest.test_mailman_user_not_created_when_flag_is_off.yaml @@ -57,16 +57,15 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode GET - uri: http://localhost:9001/3.0/lists + uri: http://localhost:9001/3.0/domains response: - body: {string: !!python/unicode '{"entries": [{"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}], "http_etag": "\"0eb6d0b88c89b5c491b7966eab97a79e221096ad\"", + body: {string: !!python/unicode '{"entries": [{"base_url": "http://example.com", + "description": null, "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", + "mail_host": "example.com", "self_link": "http://localhost:9001/3.0/domains/example.com", + "url_host": "example.com"}], "http_etag": "\"c385b155f8da284bf78dbe075e20f58a30c893ab\"", "start": 0, "total_size": 1}'} headers: - content-length: ['399'] + content-length: ['338'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -74,7 +73,7 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode DELETE - uri: http://localhost:9001/3.0/lists/foo@example.com + uri: http://localhost:9001/3.0/domains/example.com response: body: {string: !!python/unicode ''} headers: @@ -93,15 +92,4 @@ content-length: ['90'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} -- request: - body: null - headers: - accept-encoding: ['gzip, deflate'] - method: !!python/unicode DELETE - uri: http://localhost:9001/3.0/domains/example.com - response: - body: {string: !!python/unicode ''} - headers: - content-length: ['0'] - status: {code: 204, message: No Content} version: 1 diff --git a/src/postorius/tests/fixtures/vcr_cassettes/TestAddressActivationForm.test_email_used_by_django_auth_is_invalid.yaml b/src/postorius/tests/fixtures/vcr_cassettes/TestAddressActivationForm.test_email_used_by_django_auth_is_invalid.yaml index b1a44dd..b66b3ec 100644 --- a/src/postorius/tests/fixtures/vcr_cassettes/TestAddressActivationForm.test_email_used_by_django_auth_is_invalid.yaml +++ b/src/postorius/tests/fixtures/vcr_cassettes/TestAddressActivationForm.test_email_used_by_django_auth_is_invalid.yaml @@ -10,14 +10,44 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - location: ['http://localhost:9001/3.0/users/30'] + location: ['http://localhost:9001/3.0/users/110'] status: {code: 201, message: Created} - request: body: null headers: accept-encoding: ['gzip, deflate'] + method: !!python/unicode GET + uri: http://localhost:9001/3.0/domains + 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/users + response: + body: {string: !!python/unicode '{"entries": [{"created_on": "2005-08-01T07:49:23", + "http_etag": "\"2ea420b34322fbf583b57748ff7ffb8eca7a6b68\"", "is_server_owner": + false, "password": "$6$rounds=649177$wCSyb5fq55BhYNDu$WCSR7VmwjI3umadGWd9r23BucqMiysK.k8x71IPPRwtFe1hhP8u9EE5pZNJiFV646SUNA0hxhB2gjMZSyHZtd/", + "self_link": "http://localhost:9001/3.0/users/110", "user_id": 110}], "http_etag": + "\"87831c3fe18ec35fc34cebf92fa53feaac653143\"", "start": 0, "total_size": + 1}'} + headers: + content-length: ['433'] + 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/30 + uri: http://localhost:9001/3.0/users/110 response: body: {string: !!python/unicode ''} headers: diff --git a/src/postorius/tests/fixtures/vcr_cassettes/TestAddressActivationForm.test_email_used_by_expired_confirmation_profile_is_valid.yaml b/src/postorius/tests/fixtures/vcr_cassettes/TestAddressActivationForm.test_email_used_by_expired_confirmation_profile_is_valid.yaml index ad0a001..3039fa2 100644 --- a/src/postorius/tests/fixtures/vcr_cassettes/TestAddressActivationForm.test_email_used_by_expired_confirmation_profile_is_valid.yaml +++ b/src/postorius/tests/fixtures/vcr_cassettes/TestAddressActivationForm.test_email_used_by_expired_confirmation_profile_is_valid.yaml @@ -10,7 +10,7 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - location: ['http://localhost:9001/3.0/users/31'] + location: ['http://localhost:9001/3.0/users/111'] status: {code: 201, message: Created} - request: body: null @@ -28,8 +28,38 @@ body: null headers: accept-encoding: ['gzip, deflate'] + method: !!python/unicode GET + uri: http://localhost:9001/3.0/domains + 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/users + response: + body: {string: !!python/unicode '{"entries": [{"created_on": "2005-08-01T07:49:23", + "http_etag": "\"862f6abf14366c30fbe181a128f85df7a1e49fb7\"", "is_server_owner": + false, "password": "$6$rounds=690947$Uhr9I.Pmen27lubO$5WwU8Hd.ByaxXbfJNuvpIWvfxptOdnMj13ez4IaoOXp3oUT6DLtFC/6z.rZpsEaOCKa8cBwrdpAZ7QoBd4aOb0", + "self_link": "http://localhost:9001/3.0/users/111", "user_id": 111}], "http_etag": + "\"c57b9579c2a498052f26e1143d2fcd87b9ffe27c\"", "start": 0, "total_size": + 1}'} + headers: + content-length: ['433'] + 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/31 + uri: http://localhost:9001/3.0/users/111 response: body: {string: !!python/unicode ''} headers: diff --git a/src/postorius/tests/fixtures/vcr_cassettes/TestAddressActivationForm.test_email_used_by_mailman_is_invalid.yaml b/src/postorius/tests/fixtures/vcr_cassettes/TestAddressActivationForm.test_email_used_by_mailman_is_invalid.yaml index b63a06f..1a88042 100644 --- a/src/postorius/tests/fixtures/vcr_cassettes/TestAddressActivationForm.test_email_used_by_mailman_is_invalid.yaml +++ b/src/postorius/tests/fixtures/vcr_cassettes/TestAddressActivationForm.test_email_used_by_mailman_is_invalid.yaml @@ -10,7 +10,7 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - location: ['http://localhost:9001/3.0/users/32'] + location: ['http://localhost:9001/3.0/users/112'] status: {code: 201, message: Created} - request: body: null @@ -20,11 +20,41 @@ uri: http://localhost:9001/3.0/users/subscribed@example.org response: body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag": - "\"088010049330aec8a43b1b3758033ad2524d0be2\"", "is_server_owner": false, - "password": "$6$rounds=704401$tv7NBQeydbZ1L3q9$r3/xwpD0D56KjCvzoSLY.sqMZgs5NGBkCj3bfGQpu8OJH.7rPWdYSz6uaa86VmCZ.JVk8IXLg3On1oUb.nGFs0", - "self_link": "http://localhost:9001/3.0/users/32", "user_id": 32}'} + "\"2f2104c1678cab64df1a0106f97e3b94fbd3640a\"", "is_server_owner": false, + "password": "$6$rounds=676777$gJwm8V4aVFWXp7ql$lDLgXc4cj7P2mzVxMTcGB9gM.lIySG0FpF8DvsaXV9FI4KMwAIMtay3qA1k0xd.oU2QoAjbGox1vuzjc/r7Rm.", + "self_link": "http://localhost:9001/3.0/users/112", "user_id": 112}'} headers: - content-length: ['326'] + content-length: ['328'] + 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/domains + 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/users + response: + body: {string: !!python/unicode '{"entries": [{"created_on": "2005-08-01T07:49:23", + "http_etag": "\"2f2104c1678cab64df1a0106f97e3b94fbd3640a\"", "is_server_owner": + false, "password": "$6$rounds=676777$gJwm8V4aVFWXp7ql$lDLgXc4cj7P2mzVxMTcGB9gM.lIySG0FpF8DvsaXV9FI4KMwAIMtay3qA1k0xd.oU2QoAjbGox1vuzjc/r7Rm.", + "self_link": "http://localhost:9001/3.0/users/112", "user_id": 112}], "http_etag": + "\"7e51e269eac04f7c8f592121f9cdd171fef9a995\"", "start": 0, "total_size": + 1}'} + headers: + content-length: ['433'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -32,7 +62,7 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode DELETE - uri: http://localhost:9001/3.0/users/32 + uri: http://localhost:9001/3.0/users/112 response: body: {string: !!python/unicode ''} headers: diff --git a/src/postorius/tests/fixtures/vcr_cassettes/TestAddressActivationForm.test_invalid_email_is_not_valid.yaml b/src/postorius/tests/fixtures/vcr_cassettes/TestAddressActivationForm.test_invalid_email_is_not_valid.yaml index 07ab230..eaf8727 100644 --- a/src/postorius/tests/fixtures/vcr_cassettes/TestAddressActivationForm.test_invalid_email_is_not_valid.yaml +++ b/src/postorius/tests/fixtures/vcr_cassettes/TestAddressActivationForm.test_invalid_email_is_not_valid.yaml @@ -10,14 +10,44 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - location: ['http://localhost:9001/3.0/users/33'] + location: ['http://localhost:9001/3.0/users/113'] status: {code: 201, message: Created} - request: body: null headers: accept-encoding: ['gzip, deflate'] + method: !!python/unicode GET + uri: http://localhost:9001/3.0/domains + 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/users + response: + body: {string: !!python/unicode '{"entries": [{"created_on": "2005-08-01T07:49:23", + "http_etag": "\"d8fc8ffe45ae1e2350ad8583dae5395e56d72671\"", "is_server_owner": + false, "password": "$6$rounds=702496$g6uAMcPJyjm9VH6m$Z80HHCMUidwYeCuY5LPgFRon3s5jG9OaGu2uBkoLN9MOYKBXukicNRi2LeyIQcIWb3iJKN89mGBSkEmutWnMo1", + "self_link": "http://localhost:9001/3.0/users/113", "user_id": 113}], "http_etag": + "\"331e2bed8a2e7f58e7fcb3276454afe726d74a40\"", "start": 0, "total_size": + 1}'} + headers: + content-length: ['433'] + 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/33 + uri: http://localhost:9001/3.0/users/113 response: body: {string: !!python/unicode ''} headers: diff --git a/src/postorius/tests/fixtures/vcr_cassettes/TestAddressActivationForm.test_valid_email_is_valid.yaml b/src/postorius/tests/fixtures/vcr_cassettes/TestAddressActivationForm.test_valid_email_is_valid.yaml index 54419f2..fef4154 100644 --- a/src/postorius/tests/fixtures/vcr_cassettes/TestAddressActivationForm.test_valid_email_is_valid.yaml +++ b/src/postorius/tests/fixtures/vcr_cassettes/TestAddressActivationForm.test_valid_email_is_valid.yaml @@ -10,7 +10,7 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - location: ['http://localhost:9001/3.0/users/34'] + location: ['http://localhost:9001/3.0/users/114'] status: {code: 201, message: Created} - request: body: null @@ -28,8 +28,38 @@ body: null headers: accept-encoding: ['gzip, deflate'] + method: !!python/unicode GET + uri: http://localhost:9001/3.0/domains + 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/users + response: + body: {string: !!python/unicode '{"entries": [{"created_on": "2005-08-01T07:49:23", + "http_etag": "\"38672ea9967e95d594a85df073412e51ac99e4fd\"", "is_server_owner": + false, "password": "$6$rounds=686094$ojJ.pPkWmagk4hWB$4Jj.BAQBiXaL5tnz4S7JWVl43R/EQvKS/W0PvTPXQMyyXLSNcHiDROqDphYAAXHKVT9P6XK.5qq2p1vS.eRO71", + "self_link": "http://localhost:9001/3.0/users/114", "user_id": 114}], "http_etag": + "\"d458a984b4843e816ccf5a82def6fb8a99ff00b0\"", "start": 0, "total_size": + 1}'} + headers: + content-length: ['433'] + 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/34 + uri: http://localhost:9001/3.0/users/114 response: body: {string: !!python/unicode ''} headers: diff --git a/src/postorius/tests/fixtures/vcr_cassettes/TestAddressActivationLinkSuccess.test_add_address.yaml b/src/postorius/tests/fixtures/vcr_cassettes/TestAddressActivationLinkSuccess.test_add_address.yaml index 43b961a..676b31b 100644 --- a/src/postorius/tests/fixtures/vcr_cassettes/TestAddressActivationLinkSuccess.test_add_address.yaml +++ b/src/postorius/tests/fixtures/vcr_cassettes/TestAddressActivationLinkSuccess.test_add_address.yaml @@ -10,7 +10,7 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - location: ['http://localhost:9001/3.0/users/35'] + location: ['http://localhost:9001/3.0/users/115'] status: {code: 201, message: Created} - request: body: null @@ -20,11 +20,11 @@ uri: http://localhost:9001/3.0/users/ler@example.org response: body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag": - "\"48e7e905e9f9cf6179386cd903f444e244aeffc2\"", "is_server_owner": false, - "password": "$6$rounds=721149$x0wUd4fDySxlcZbX$0jy5w3eH3l5Hafpev5JLp8eYVeqMoVywQJi5NzKTeMZf7tWWzjoHQldwCfBv8j0.w5/2tUI9KYGJbfkWiUW7Q0", - "self_link": "http://localhost:9001/3.0/users/35", "user_id": 35}'} + "\"ca09bdabdf856fa073ea1ae5572895517224498d\"", "is_server_owner": false, + "password": "$6$rounds=717520$.ChQjyfXD5UB9xTz$wPfdG6HmoLPDJT0FIQ8InujMCwMgGWZvQk1Un7meow3kTgr4CuJqiz7viv3DuGsHVUDq5s.n4FqZFRLGMA0AV.", + "self_link": "http://localhost:9001/3.0/users/115", "user_id": 115}'} headers: - content-length: ['326'] + content-length: ['328'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -32,15 +32,15 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode GET - uri: http://localhost:9001/3.0/users/35/addresses + uri: http://localhost:9001/3.0/users/115/addresses response: body: {string: !!python/unicode '{"entries": [{"email": "ler@example.org", "http_etag": - "\"6e3ef616d79be795bde6fda2673808e438422507\"", "original_email": "ler@example.org", + "\"b7ad7895646e8b63fa9ee7923b8172f1a282deb0\"", "original_email": "ler@example.org", "registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/ler@example.org", - "user": "http://localhost:9001/3.0/users/35"}], "http_etag": "\"a1c4fa39d16aca786421a6cf29242f97d483805f\"", + "user": "http://localhost:9001/3.0/users/115"}], "http_etag": "\"8521b58d7a778d78806c7fdc7b21f3040ba4beb1\"", "start": 0, "total_size": 1}'} headers: - content-length: ['385'] + content-length: ['386'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -51,11 +51,11 @@ uri: http://localhost:9001/3.0/users/ler@example.org response: body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag": - "\"48e7e905e9f9cf6179386cd903f444e244aeffc2\"", "is_server_owner": false, - "password": "$6$rounds=721149$x0wUd4fDySxlcZbX$0jy5w3eH3l5Hafpev5JLp8eYVeqMoVywQJi5NzKTeMZf7tWWzjoHQldwCfBv8j0.w5/2tUI9KYGJbfkWiUW7Q0", - "self_link": "http://localhost:9001/3.0/users/35", "user_id": 35}'} + "\"ca09bdabdf856fa073ea1ae5572895517224498d\"", "is_server_owner": false, + "password": "$6$rounds=717520$.ChQjyfXD5UB9xTz$wPfdG6HmoLPDJT0FIQ8InujMCwMgGWZvQk1Un7meow3kTgr4CuJqiz7viv3DuGsHVUDq5s.n4FqZFRLGMA0AV.", + "self_link": "http://localhost:9001/3.0/users/115", "user_id": 115}'} headers: - content-length: ['326'] + content-length: ['328'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -64,7 +64,7 @@ accept-encoding: ['gzip, deflate'] !!python/unicode content-type: [!!python/unicode application/x-www-form-urlencoded] method: !!python/unicode POST - uri: http://localhost:9001/3.0/users/35/addresses + uri: http://localhost:9001/3.0/users/115/addresses response: body: {string: !!python/unicode ''} headers: @@ -90,11 +90,11 @@ uri: http://localhost:9001/3.0/users/ler@example.org response: body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag": - "\"48e7e905e9f9cf6179386cd903f444e244aeffc2\"", "is_server_owner": false, - "password": "$6$rounds=721149$x0wUd4fDySxlcZbX$0jy5w3eH3l5Hafpev5JLp8eYVeqMoVywQJi5NzKTeMZf7tWWzjoHQldwCfBv8j0.w5/2tUI9KYGJbfkWiUW7Q0", - "self_link": "http://localhost:9001/3.0/users/35", "user_id": 35}'} + "\"ca09bdabdf856fa073ea1ae5572895517224498d\"", "is_server_owner": false, + "password": "$6$rounds=717520$.ChQjyfXD5UB9xTz$wPfdG6HmoLPDJT0FIQ8InujMCwMgGWZvQk1Un7meow3kTgr4CuJqiz7viv3DuGsHVUDq5s.n4FqZFRLGMA0AV.", + "self_link": "http://localhost:9001/3.0/users/115", "user_id": 115}'} headers: - content-length: ['326'] + content-length: ['328'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -102,19 +102,19 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode GET - uri: http://localhost:9001/3.0/users/35/addresses + uri: http://localhost:9001/3.0/users/115/addresses response: body: {string: !!python/unicode '{"entries": [{"email": "ler@example.org", "http_etag": - "\"6e3ef616d79be795bde6fda2673808e438422507\"", "original_email": "ler@example.org", + "\"b7ad7895646e8b63fa9ee7923b8172f1a282deb0\"", "original_email": "ler@example.org", "registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/ler@example.org", - "user": "http://localhost:9001/3.0/users/35"}, {"email": "les@example.org", - "http_etag": "\"9497341fb8d6b71d0af288015802a64cf2fdcd2e\"", "original_email": + "user": "http://localhost:9001/3.0/users/115"}, {"email": "les@example.org", + "http_etag": "\"b83229a4ec906aa5d9634137eaf8547623053bc7\"", "original_email": "les@example.org", "registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/les@example.org", - "user": "http://localhost:9001/3.0/users/35", "verified_on": "2005-08-01T07:49:23"}], - "http_etag": "\"3ff83dee5ee9450b5237e07a10f0d0309dfb217d\"", "start": 0, "total_size": + "user": "http://localhost:9001/3.0/users/115", "verified_on": "2005-08-01T07:49:23"}], + "http_etag": "\"a280ed2b292b50ba2825562af33365c2074e6451\"", "start": 0, "total_size": 2}'} headers: - content-length: ['705'] + content-length: ['707'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -125,11 +125,11 @@ uri: http://localhost:9001/3.0/users/ler@example.org response: body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag": - "\"48e7e905e9f9cf6179386cd903f444e244aeffc2\"", "is_server_owner": false, - "password": "$6$rounds=721149$x0wUd4fDySxlcZbX$0jy5w3eH3l5Hafpev5JLp8eYVeqMoVywQJi5NzKTeMZf7tWWzjoHQldwCfBv8j0.w5/2tUI9KYGJbfkWiUW7Q0", - "self_link": "http://localhost:9001/3.0/users/35", "user_id": 35}'} + "\"ca09bdabdf856fa073ea1ae5572895517224498d\"", "is_server_owner": false, + "password": "$6$rounds=717520$.ChQjyfXD5UB9xTz$wPfdG6HmoLPDJT0FIQ8InujMCwMgGWZvQk1Un7meow3kTgr4CuJqiz7viv3DuGsHVUDq5s.n4FqZFRLGMA0AV.", + "self_link": "http://localhost:9001/3.0/users/115", "user_id": 115}'} headers: - content-length: ['326'] + content-length: ['328'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -137,19 +137,19 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode GET - uri: http://localhost:9001/3.0/users/35/addresses + uri: http://localhost:9001/3.0/users/115/addresses response: body: {string: !!python/unicode '{"entries": [{"email": "ler@example.org", "http_etag": - "\"6e3ef616d79be795bde6fda2673808e438422507\"", "original_email": "ler@example.org", + "\"b7ad7895646e8b63fa9ee7923b8172f1a282deb0\"", "original_email": "ler@example.org", "registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/ler@example.org", - "user": "http://localhost:9001/3.0/users/35"}, {"email": "les@example.org", - "http_etag": "\"9497341fb8d6b71d0af288015802a64cf2fdcd2e\"", "original_email": + "user": "http://localhost:9001/3.0/users/115"}, {"email": "les@example.org", + "http_etag": "\"b83229a4ec906aa5d9634137eaf8547623053bc7\"", "original_email": "les@example.org", "registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/les@example.org", - "user": "http://localhost:9001/3.0/users/35", "verified_on": "2005-08-01T07:49:23"}], - "http_etag": "\"3ff83dee5ee9450b5237e07a10f0d0309dfb217d\"", "start": 0, "total_size": + "user": "http://localhost:9001/3.0/users/115", "verified_on": "2005-08-01T07:49:23"}], + "http_etag": "\"a280ed2b292b50ba2825562af33365c2074e6451\"", "start": 0, "total_size": 2}'} headers: - content-length: ['705'] + content-length: ['707'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -160,11 +160,11 @@ uri: http://localhost:9001/3.0/users/ler@example.org response: body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag": - "\"48e7e905e9f9cf6179386cd903f444e244aeffc2\"", "is_server_owner": false, - "password": "$6$rounds=721149$x0wUd4fDySxlcZbX$0jy5w3eH3l5Hafpev5JLp8eYVeqMoVywQJi5NzKTeMZf7tWWzjoHQldwCfBv8j0.w5/2tUI9KYGJbfkWiUW7Q0", - "self_link": "http://localhost:9001/3.0/users/35", "user_id": 35}'} + "\"ca09bdabdf856fa073ea1ae5572895517224498d\"", "is_server_owner": false, + "password": "$6$rounds=717520$.ChQjyfXD5UB9xTz$wPfdG6HmoLPDJT0FIQ8InujMCwMgGWZvQk1Un7meow3kTgr4CuJqiz7viv3DuGsHVUDq5s.n4FqZFRLGMA0AV.", + "self_link": "http://localhost:9001/3.0/users/115", "user_id": 115}'} headers: - content-length: ['326'] + content-length: ['328'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -172,14 +172,14 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode GET - uri: http://localhost:9001/3.0/users/35 + uri: http://localhost:9001/3.0/users/115 response: body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag": - "\"48e7e905e9f9cf6179386cd903f444e244aeffc2\"", "is_server_owner": false, - "password": "$6$rounds=721149$x0wUd4fDySxlcZbX$0jy5w3eH3l5Hafpev5JLp8eYVeqMoVywQJi5NzKTeMZf7tWWzjoHQldwCfBv8j0.w5/2tUI9KYGJbfkWiUW7Q0", - "self_link": "http://localhost:9001/3.0/users/35", "user_id": 35}'} + "\"ca09bdabdf856fa073ea1ae5572895517224498d\"", "is_server_owner": false, + "password": "$6$rounds=717520$.ChQjyfXD5UB9xTz$wPfdG6HmoLPDJT0FIQ8InujMCwMgGWZvQk1Un7meow3kTgr4CuJqiz7viv3DuGsHVUDq5s.n4FqZFRLGMA0AV.", + "self_link": "http://localhost:9001/3.0/users/115", "user_id": 115}'} headers: - content-length: ['326'] + content-length: ['328'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -187,19 +187,49 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode GET - uri: http://localhost:9001/3.0/users/35/addresses + uri: http://localhost:9001/3.0/users/115/addresses response: body: {string: !!python/unicode '{"entries": [{"email": "ler@example.org", "http_etag": - "\"6e3ef616d79be795bde6fda2673808e438422507\"", "original_email": "ler@example.org", + "\"b7ad7895646e8b63fa9ee7923b8172f1a282deb0\"", "original_email": "ler@example.org", "registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/ler@example.org", - "user": "http://localhost:9001/3.0/users/35"}, {"email": "les@example.org", - "http_etag": "\"9497341fb8d6b71d0af288015802a64cf2fdcd2e\"", "original_email": + "user": "http://localhost:9001/3.0/users/115"}, {"email": "les@example.org", + "http_etag": "\"b83229a4ec906aa5d9634137eaf8547623053bc7\"", "original_email": "les@example.org", "registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/les@example.org", - "user": "http://localhost:9001/3.0/users/35", "verified_on": "2005-08-01T07:49:23"}], - "http_etag": "\"3ff83dee5ee9450b5237e07a10f0d0309dfb217d\"", "start": 0, "total_size": + "user": "http://localhost:9001/3.0/users/115", "verified_on": "2005-08-01T07:49:23"}], + "http_etag": "\"a280ed2b292b50ba2825562af33365c2074e6451\"", "start": 0, "total_size": 2}'} headers: - content-length: ['705'] + content-length: ['707'] + 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/domains + 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/users + response: + body: {string: !!python/unicode '{"entries": [{"created_on": "2005-08-01T07:49:23", + "http_etag": "\"ca09bdabdf856fa073ea1ae5572895517224498d\"", "is_server_owner": + false, "password": "$6$rounds=717520$.ChQjyfXD5UB9xTz$wPfdG6HmoLPDJT0FIQ8InujMCwMgGWZvQk1Un7meow3kTgr4CuJqiz7viv3DuGsHVUDq5s.n4FqZFRLGMA0AV.", + "self_link": "http://localhost:9001/3.0/users/115", "user_id": 115}], "http_etag": + "\"ed5c462bb0d03694b11c9eed48bfdb387be58451\"", "start": 0, "total_size": + 1}'} + headers: + content-length: ['433'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -207,7 +237,7 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode DELETE - uri: http://localhost:9001/3.0/users/35 + uri: http://localhost:9001/3.0/users/115 response: body: {string: !!python/unicode ''} headers: diff --git a/src/postorius/tests/fixtures/vcr_cassettes/TestAddressConfirmationProfile.test_confirmation_link.yaml b/src/postorius/tests/fixtures/vcr_cassettes/TestAddressConfirmationProfile.test_confirmation_link.yaml new file mode 100644 index 0000000..69ef46a --- /dev/null +++ b/src/postorius/tests/fixtures/vcr_cassettes/TestAddressConfirmationProfile.test_confirmation_link.yaml @@ -0,0 +1,28 @@ +interactions: +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + method: !!python/unicode GET + uri: http://localhost:9001/3.0/domains + 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/users + 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} +version: 1 diff --git a/src/postorius/tests/fixtures/vcr_cassettes/TestAddressConfirmationProfile.test_profile_creation.yaml b/src/postorius/tests/fixtures/vcr_cassettes/TestAddressConfirmationProfile.test_profile_creation.yaml new file mode 100644 index 0000000..69ef46a --- /dev/null +++ b/src/postorius/tests/fixtures/vcr_cassettes/TestAddressConfirmationProfile.test_profile_creation.yaml @@ -0,0 +1,28 @@ +interactions: +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + method: !!python/unicode GET + uri: http://localhost:9001/3.0/domains + 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/users + 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} +version: 1 diff --git a/src/postorius/tests/fixtures/vcr_cassettes/TestAddressConfirmationProfile.test_profile_is_expired_default_setting.yaml b/src/postorius/tests/fixtures/vcr_cassettes/TestAddressConfirmationProfile.test_profile_is_expired_default_setting.yaml new file mode 100644 index 0000000..69ef46a --- /dev/null +++ b/src/postorius/tests/fixtures/vcr_cassettes/TestAddressConfirmationProfile.test_profile_is_expired_default_setting.yaml @@ -0,0 +1,28 @@ +interactions: +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + method: !!python/unicode GET + uri: http://localhost:9001/3.0/domains + 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/users + 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} +version: 1 diff --git a/src/postorius/tests/fixtures/vcr_cassettes/TestAddressConfirmationProfile.test_profile_is_updated_on_save.yaml b/src/postorius/tests/fixtures/vcr_cassettes/TestAddressConfirmationProfile.test_profile_is_updated_on_save.yaml new file mode 100644 index 0000000..69ef46a --- /dev/null +++ b/src/postorius/tests/fixtures/vcr_cassettes/TestAddressConfirmationProfile.test_profile_is_updated_on_save.yaml @@ -0,0 +1,28 @@ +interactions: +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + method: !!python/unicode GET + uri: http://localhost:9001/3.0/domains + 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/users + 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} +version: 1 diff --git a/src/postorius/tests/fixtures/vcr_cassettes/TestAddressConfirmationProfile.test_profile_not_expired.yaml b/src/postorius/tests/fixtures/vcr_cassettes/TestAddressConfirmationProfile.test_profile_not_expired.yaml new file mode 100644 index 0000000..69ef46a --- /dev/null +++ b/src/postorius/tests/fixtures/vcr_cassettes/TestAddressConfirmationProfile.test_profile_not_expired.yaml @@ -0,0 +1,28 @@ +interactions: +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + method: !!python/unicode GET + uri: http://localhost:9001/3.0/domains + 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/users + 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} +version: 1 diff --git a/src/postorius/tests/fixtures/vcr_cassettes/TestAddressConfirmationProfile.test_profile_not_expired_default_setting.yaml b/src/postorius/tests/fixtures/vcr_cassettes/TestAddressConfirmationProfile.test_profile_not_expired_default_setting.yaml new file mode 100644 index 0000000..69ef46a --- /dev/null +++ b/src/postorius/tests/fixtures/vcr_cassettes/TestAddressConfirmationProfile.test_profile_not_expired_default_setting.yaml @@ -0,0 +1,28 @@ +interactions: +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + method: !!python/unicode GET + uri: http://localhost:9001/3.0/domains + 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/users + 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} +version: 1 diff --git a/src/postorius/tests/fixtures/vcr_cassettes/TestAddressConfirmationProfile.test_unicode_representation.yaml b/src/postorius/tests/fixtures/vcr_cassettes/TestAddressConfirmationProfile.test_unicode_representation.yaml new file mode 100644 index 0000000..69ef46a --- /dev/null +++ b/src/postorius/tests/fixtures/vcr_cassettes/TestAddressConfirmationProfile.test_unicode_representation.yaml @@ -0,0 +1,28 @@ +interactions: +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + method: !!python/unicode GET + uri: http://localhost:9001/3.0/domains + 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/users + 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} +version: 1 diff --git a/src/postorius/tests/fixtures/vcr_cassettes/TestProfile.test_post_form_with_smtp_exception.yaml b/src/postorius/tests/fixtures/vcr_cassettes/TestProfile.test_post_form_with_smtp_exception.yaml index 0eee3f4..15055cd 100644 --- a/src/postorius/tests/fixtures/vcr_cassettes/TestProfile.test_post_form_with_smtp_exception.yaml +++ b/src/postorius/tests/fixtures/vcr_cassettes/TestProfile.test_post_form_with_smtp_exception.yaml @@ -56,11 +56,52 @@ uri: http://localhost:9001/3.0/users/1 response: body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag": - "\"f0b94bf2edd58e88d678043b4b49362ca377722e\"", "is_server_owner": false, - "password": "$6$rounds=690702$ldltgxeeAosAEu84$ypRhGVnPjh7q/JCzASdnPfc9C2lytW2mFFbTOfncE93GP9pETx6Z.Jra2.ERfCF.v/bueX6J6vvU8rWR9sCDk/", + "\"7638b81bc998c9ab658fe1a667546f1a31e4bdbf\"", "is_server_owner": false, + "password": "$6$rounds=717826$Wh5Czxm6hOIUZ6rs$0y0MQM877DONrCx6pgYVmTEztIEMV7NO7oYf8NXlhNxDT2OHNFvQppIdZdtPMXy8HAJiHRUWE1RSG26cdKOgm/", "self_link": "http://localhost:9001/3.0/users/1", "user_id": 1}'} headers: content-length: ['324'] 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/domains + 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/users + response: + body: {string: !!python/unicode '{"entries": [{"created_on": "2005-08-01T07:49:23", + "http_etag": "\"7638b81bc998c9ab658fe1a667546f1a31e4bdbf\"", "is_server_owner": + false, "password": "$6$rounds=717826$Wh5Czxm6hOIUZ6rs$0y0MQM877DONrCx6pgYVmTEztIEMV7NO7oYf8NXlhNxDT2OHNFvQppIdZdtPMXy8HAJiHRUWE1RSG26cdKOgm/", + "self_link": "http://localhost:9001/3.0/users/1", "user_id": 1}], "http_etag": + "\"ad6c7ac43730c716afad4e5c758969e91155e82d\"", "start": 0, "total_size": + 1}'} + headers: + content-length: ['429'] + 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/1 + response: + body: {string: !!python/unicode ''} + headers: + content-length: ['0'] + status: {code: 204, message: No Content} version: 1 diff --git a/src/postorius/tests/fixtures/vcr_cassettes/TestProfile.test_post_invalid_form_shows_error_msg.yaml b/src/postorius/tests/fixtures/vcr_cassettes/TestProfile.test_post_invalid_form_shows_error_msg.yaml index d5a674c..9eac38f 100644 --- a/src/postorius/tests/fixtures/vcr_cassettes/TestProfile.test_post_invalid_form_shows_error_msg.yaml +++ b/src/postorius/tests/fixtures/vcr_cassettes/TestProfile.test_post_invalid_form_shows_error_msg.yaml @@ -6,30 +6,11 @@ method: !!python/unicode GET uri: http://localhost:9001/3.0/users/les@example.org response: - body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag": - "\"f0b94bf2edd58e88d678043b4b49362ca377722e\"", "is_server_owner": false, - "password": "$6$rounds=690702$ldltgxeeAosAEu84$ypRhGVnPjh7q/JCzASdnPfc9C2lytW2mFFbTOfncE93GP9pETx6Z.Jra2.ERfCF.v/bueX6J6vvU8rWR9sCDk/", - "self_link": "http://localhost:9001/3.0/users/1", "user_id": 1}'} + body: {string: !!python/unicode 404 Not Found} headers: - content-length: ['324'] + content-length: ['13'] 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/1/addresses - response: - body: {string: !!python/unicode '{"entries": [{"email": "les@example.org", "http_etag": - "\"dc79f04b185dfcc8e220efd7e4061b4d1abb253e\"", "original_email": "les@example.org", - "registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/les@example.org", - "user": "http://localhost:9001/3.0/users/1"}], "http_etag": "\"79d13bca14b3c9c60f1392a2e3cb1847b961fe2b\"", - "start": 0, "total_size": 1}'} - headers: - content-length: ['384'] - content-type: [application/json; charset=utf-8] - status: {code: 200, message: OK} + status: {code: 404, message: Not Found} - request: body: null headers: @@ -37,12 +18,78 @@ method: !!python/unicode GET uri: http://localhost:9001/3.0/users/les@example.org 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: email=les%40example.org + headers: + accept-encoding: ['gzip, deflate'] + !!python/unicode content-type: [!!python/unicode application/x-www-form-urlencoded] + method: !!python/unicode POST + uri: http://localhost:9001/3.0/users + response: + body: {string: !!python/unicode ''} + headers: + content-length: ['0'] + location: ['http://localhost:9001/3.0/users/2'] + status: {code: 201, message: Created} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + method: !!python/unicode GET + uri: http://localhost:9001/3.0/users/2 + response: body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag": - "\"f0b94bf2edd58e88d678043b4b49362ca377722e\"", "is_server_owner": false, - "password": "$6$rounds=690702$ldltgxeeAosAEu84$ypRhGVnPjh7q/JCzASdnPfc9C2lytW2mFFbTOfncE93GP9pETx6Z.Jra2.ERfCF.v/bueX6J6vvU8rWR9sCDk/", - "self_link": "http://localhost:9001/3.0/users/1", "user_id": 1}'} + "\"1a3aa88b2cd54f39cc383ee227e4fe2e5523a053\"", "is_server_owner": false, + "password": "$6$rounds=685646$vZ6MnU/EhjWMmJj/$bP0uRgUcHzu/94frX6.ypX7w2W4l/xz5zG.p3RqBiFeISayJc6G/U98lJjdsNVEGQEd6qBDK4w4rultFTkB9Z/", + "self_link": "http://localhost:9001/3.0/users/2", "user_id": 2}'} headers: content-length: ['324'] 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/domains + 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/users + response: + body: {string: !!python/unicode '{"entries": [{"created_on": "2005-08-01T07:49:23", + "http_etag": "\"1a3aa88b2cd54f39cc383ee227e4fe2e5523a053\"", "is_server_owner": + false, "password": "$6$rounds=685646$vZ6MnU/EhjWMmJj/$bP0uRgUcHzu/94frX6.ypX7w2W4l/xz5zG.p3RqBiFeISayJc6G/U98lJjdsNVEGQEd6qBDK4w4rultFTkB9Z/", + "self_link": "http://localhost:9001/3.0/users/2", "user_id": 2}], "http_etag": + "\"fd9719839d5a1e11cd4eef94074fa04a3fa79251\"", "start": 0, "total_size": + 1}'} + headers: + content-length: ['429'] + 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/2 + response: + body: {string: !!python/unicode ''} + headers: + content-length: ['0'] + status: {code: 204, message: No Content} version: 1 diff --git a/src/postorius/tests/fixtures/vcr_cassettes/TestProfile.test_post_valid_form_redirects_on_success.yaml b/src/postorius/tests/fixtures/vcr_cassettes/TestProfile.test_post_valid_form_redirects_on_success.yaml index d9d9996..c66bb17 100644 --- a/src/postorius/tests/fixtures/vcr_cassettes/TestProfile.test_post_valid_form_redirects_on_success.yaml +++ b/src/postorius/tests/fixtures/vcr_cassettes/TestProfile.test_post_valid_form_redirects_on_success.yaml @@ -6,30 +6,11 @@ method: !!python/unicode GET uri: http://localhost:9001/3.0/users/les@example.org response: - body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag": - "\"f0b94bf2edd58e88d678043b4b49362ca377722e\"", "is_server_owner": false, - "password": "$6$rounds=690702$ldltgxeeAosAEu84$ypRhGVnPjh7q/JCzASdnPfc9C2lytW2mFFbTOfncE93GP9pETx6Z.Jra2.ERfCF.v/bueX6J6vvU8rWR9sCDk/", - "self_link": "http://localhost:9001/3.0/users/1", "user_id": 1}'} + body: {string: !!python/unicode 404 Not Found} headers: - content-length: ['324'] + content-length: ['13'] 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/1/addresses - response: - body: {string: !!python/unicode '{"entries": [{"email": "les@example.org", "http_etag": - "\"dc79f04b185dfcc8e220efd7e4061b4d1abb253e\"", "original_email": "les@example.org", - "registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/les@example.org", - "user": "http://localhost:9001/3.0/users/1"}], "http_etag": "\"79d13bca14b3c9c60f1392a2e3cb1847b961fe2b\"", - "start": 0, "total_size": 1}'} - headers: - content-length: ['384'] - content-type: [application/json; charset=utf-8] - status: {code: 200, message: OK} + status: {code: 404, message: Not Found} - request: body: null headers: @@ -37,14 +18,24 @@ method: !!python/unicode GET uri: http://localhost:9001/3.0/users/les@example.org response: - body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag": - "\"f0b94bf2edd58e88d678043b4b49362ca377722e\"", "is_server_owner": false, - "password": "$6$rounds=690702$ldltgxeeAosAEu84$ypRhGVnPjh7q/JCzASdnPfc9C2lytW2mFFbTOfncE93GP9pETx6Z.Jra2.ERfCF.v/bueX6J6vvU8rWR9sCDk/", - "self_link": "http://localhost:9001/3.0/users/1", "user_id": 1}'} + body: {string: !!python/unicode 404 Not Found} headers: - content-length: ['324'] + content-length: ['13'] content-type: [application/json; charset=utf-8] - status: {code: 200, message: OK} + status: {code: 404, message: Not Found} +- request: + body: email=les%40example.org + headers: + accept-encoding: ['gzip, deflate'] + !!python/unicode content-type: [!!python/unicode application/x-www-form-urlencoded] + method: !!python/unicode POST + uri: http://localhost:9001/3.0/users + response: + body: {string: !!python/unicode ''} + headers: + content-length: ['0'] + location: ['http://localhost:9001/3.0/users/3'] + status: {code: 201, message: Created} - request: body: null headers: @@ -65,9 +56,9 @@ uri: http://localhost:9001/3.0/users/les@example.org response: body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag": - "\"f0b94bf2edd58e88d678043b4b49362ca377722e\"", "is_server_owner": false, - "password": "$6$rounds=690702$ldltgxeeAosAEu84$ypRhGVnPjh7q/JCzASdnPfc9C2lytW2mFFbTOfncE93GP9pETx6Z.Jra2.ERfCF.v/bueX6J6vvU8rWR9sCDk/", - "self_link": "http://localhost:9001/3.0/users/1", "user_id": 1}'} + "\"b7d63e692f1cdb815f6c198d5b41e094e1e32397\"", "is_server_owner": false, + "password": "$6$rounds=680355$VVIdbVOFYg8D/HoG$8Vp4V1NpbM38RfUMkH3Ayycip/zSx8K/TfKsLxwL3pEzAsLxM5Aqzqm0NiLotVPb34dTiaVVVuGmzEZHeCa/1.", + "self_link": "http://localhost:9001/3.0/users/3", "user_id": 3}'} headers: content-length: ['324'] content-type: [application/json; charset=utf-8] @@ -77,12 +68,12 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode GET - uri: http://localhost:9001/3.0/users/1/addresses + uri: http://localhost:9001/3.0/users/3/addresses response: body: {string: !!python/unicode '{"entries": [{"email": "les@example.org", "http_etag": - "\"dc79f04b185dfcc8e220efd7e4061b4d1abb253e\"", "original_email": "les@example.org", + "\"de6a1923a224a2af2efb15b0f894f44ac33d012b\"", "original_email": "les@example.org", "registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/les@example.org", - "user": "http://localhost:9001/3.0/users/1"}], "http_etag": "\"79d13bca14b3c9c60f1392a2e3cb1847b961fe2b\"", + "user": "http://localhost:9001/3.0/users/3"}], "http_etag": "\"7c3754cdddaac7ec96cbb665ae89ac8dcab5ebad\"", "start": 0, "total_size": 1}'} headers: content-length: ['384'] @@ -96,11 +87,52 @@ uri: http://localhost:9001/3.0/users/les@example.org response: body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag": - "\"f0b94bf2edd58e88d678043b4b49362ca377722e\"", "is_server_owner": false, - "password": "$6$rounds=690702$ldltgxeeAosAEu84$ypRhGVnPjh7q/JCzASdnPfc9C2lytW2mFFbTOfncE93GP9pETx6Z.Jra2.ERfCF.v/bueX6J6vvU8rWR9sCDk/", - "self_link": "http://localhost:9001/3.0/users/1", "user_id": 1}'} + "\"b7d63e692f1cdb815f6c198d5b41e094e1e32397\"", "is_server_owner": false, + "password": "$6$rounds=680355$VVIdbVOFYg8D/HoG$8Vp4V1NpbM38RfUMkH3Ayycip/zSx8K/TfKsLxwL3pEzAsLxM5Aqzqm0NiLotVPb34dTiaVVVuGmzEZHeCa/1.", + "self_link": "http://localhost:9001/3.0/users/3", "user_id": 3}'} headers: content-length: ['324'] 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/domains + 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/users + response: + body: {string: !!python/unicode '{"entries": [{"created_on": "2005-08-01T07:49:23", + "http_etag": "\"b7d63e692f1cdb815f6c198d5b41e094e1e32397\"", "is_server_owner": + false, "password": "$6$rounds=680355$VVIdbVOFYg8D/HoG$8Vp4V1NpbM38RfUMkH3Ayycip/zSx8K/TfKsLxwL3pEzAsLxM5Aqzqm0NiLotVPb34dTiaVVVuGmzEZHeCa/1.", + "self_link": "http://localhost:9001/3.0/users/3", "user_id": 3}], "http_etag": + "\"db11dbb16d9121822c3c6fda76e5ed1f5b98a7d2\"", "start": 0, "total_size": + 1}'} + headers: + content-length: ['429'] + 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/3 + response: + body: {string: !!python/unicode ''} + headers: + content-length: ['0'] + status: {code: 204, message: No Content} version: 1 diff --git a/src/postorius/tests/fixtures/vcr_cassettes/TestProfile.test_post_valid_form_shows_success_message.yaml b/src/postorius/tests/fixtures/vcr_cassettes/TestProfile.test_post_valid_form_shows_success_message.yaml index d9d9996..e99f398 100644 --- a/src/postorius/tests/fixtures/vcr_cassettes/TestProfile.test_post_valid_form_shows_success_message.yaml +++ b/src/postorius/tests/fixtures/vcr_cassettes/TestProfile.test_post_valid_form_shows_success_message.yaml @@ -6,30 +6,11 @@ method: !!python/unicode GET uri: http://localhost:9001/3.0/users/les@example.org response: - body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag": - "\"f0b94bf2edd58e88d678043b4b49362ca377722e\"", "is_server_owner": false, - "password": "$6$rounds=690702$ldltgxeeAosAEu84$ypRhGVnPjh7q/JCzASdnPfc9C2lytW2mFFbTOfncE93GP9pETx6Z.Jra2.ERfCF.v/bueX6J6vvU8rWR9sCDk/", - "self_link": "http://localhost:9001/3.0/users/1", "user_id": 1}'} + body: {string: !!python/unicode 404 Not Found} headers: - content-length: ['324'] + content-length: ['13'] 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/1/addresses - response: - body: {string: !!python/unicode '{"entries": [{"email": "les@example.org", "http_etag": - "\"dc79f04b185dfcc8e220efd7e4061b4d1abb253e\"", "original_email": "les@example.org", - "registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/les@example.org", - "user": "http://localhost:9001/3.0/users/1"}], "http_etag": "\"79d13bca14b3c9c60f1392a2e3cb1847b961fe2b\"", - "start": 0, "total_size": 1}'} - headers: - content-length: ['384'] - content-type: [application/json; charset=utf-8] - status: {code: 200, message: OK} + status: {code: 404, message: Not Found} - request: body: null headers: @@ -37,14 +18,24 @@ method: !!python/unicode GET uri: http://localhost:9001/3.0/users/les@example.org response: - body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag": - "\"f0b94bf2edd58e88d678043b4b49362ca377722e\"", "is_server_owner": false, - "password": "$6$rounds=690702$ldltgxeeAosAEu84$ypRhGVnPjh7q/JCzASdnPfc9C2lytW2mFFbTOfncE93GP9pETx6Z.Jra2.ERfCF.v/bueX6J6vvU8rWR9sCDk/", - "self_link": "http://localhost:9001/3.0/users/1", "user_id": 1}'} + body: {string: !!python/unicode 404 Not Found} headers: - content-length: ['324'] + content-length: ['13'] content-type: [application/json; charset=utf-8] - status: {code: 200, message: OK} + status: {code: 404, message: Not Found} +- request: + body: email=les%40example.org + headers: + accept-encoding: ['gzip, deflate'] + !!python/unicode content-type: [!!python/unicode application/x-www-form-urlencoded] + method: !!python/unicode POST + uri: http://localhost:9001/3.0/users + response: + body: {string: !!python/unicode ''} + headers: + content-length: ['0'] + location: ['http://localhost:9001/3.0/users/4'] + status: {code: 201, message: Created} - request: body: null headers: @@ -65,9 +56,9 @@ uri: http://localhost:9001/3.0/users/les@example.org response: body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag": - "\"f0b94bf2edd58e88d678043b4b49362ca377722e\"", "is_server_owner": false, - "password": "$6$rounds=690702$ldltgxeeAosAEu84$ypRhGVnPjh7q/JCzASdnPfc9C2lytW2mFFbTOfncE93GP9pETx6Z.Jra2.ERfCF.v/bueX6J6vvU8rWR9sCDk/", - "self_link": "http://localhost:9001/3.0/users/1", "user_id": 1}'} + "\"38608862753852e1594b0569ca9f829ba203f02d\"", "is_server_owner": false, + "password": "$6$rounds=665394$dwfj7W19CAmlrQDx$FXRiQm4V16IDXAtWi05FXqaPJDWoZE1G4kTcnxEEJr4DIVC8Xl9DDNhSrFHRTkIgj03h3fOxWAwZm6yCJGyOm0", + "self_link": "http://localhost:9001/3.0/users/4", "user_id": 4}'} headers: content-length: ['324'] content-type: [application/json; charset=utf-8] @@ -77,12 +68,12 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode GET - uri: http://localhost:9001/3.0/users/1/addresses + uri: http://localhost:9001/3.0/users/4/addresses response: body: {string: !!python/unicode '{"entries": [{"email": "les@example.org", "http_etag": - "\"dc79f04b185dfcc8e220efd7e4061b4d1abb253e\"", "original_email": "les@example.org", + "\"96914eb17770a09302e3be4860191b2eaebfce2d\"", "original_email": "les@example.org", "registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/les@example.org", - "user": "http://localhost:9001/3.0/users/1"}], "http_etag": "\"79d13bca14b3c9c60f1392a2e3cb1847b961fe2b\"", + "user": "http://localhost:9001/3.0/users/4"}], "http_etag": "\"c9346595dcf5d836882bd227f35ba2d8211d5396\"", "start": 0, "total_size": 1}'} headers: content-length: ['384'] @@ -96,11 +87,52 @@ uri: http://localhost:9001/3.0/users/les@example.org response: body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag": - "\"f0b94bf2edd58e88d678043b4b49362ca377722e\"", "is_server_owner": false, - "password": "$6$rounds=690702$ldltgxeeAosAEu84$ypRhGVnPjh7q/JCzASdnPfc9C2lytW2mFFbTOfncE93GP9pETx6Z.Jra2.ERfCF.v/bueX6J6vvU8rWR9sCDk/", - "self_link": "http://localhost:9001/3.0/users/1", "user_id": 1}'} + "\"38608862753852e1594b0569ca9f829ba203f02d\"", "is_server_owner": false, + "password": "$6$rounds=665394$dwfj7W19CAmlrQDx$FXRiQm4V16IDXAtWi05FXqaPJDWoZE1G4kTcnxEEJr4DIVC8Xl9DDNhSrFHRTkIgj03h3fOxWAwZm6yCJGyOm0", + "self_link": "http://localhost:9001/3.0/users/4", "user_id": 4}'} headers: content-length: ['324'] 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/domains + 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/users + response: + body: {string: !!python/unicode '{"entries": [{"created_on": "2005-08-01T07:49:23", + "http_etag": "\"38608862753852e1594b0569ca9f829ba203f02d\"", "is_server_owner": + false, "password": "$6$rounds=665394$dwfj7W19CAmlrQDx$FXRiQm4V16IDXAtWi05FXqaPJDWoZE1G4kTcnxEEJr4DIVC8Xl9DDNhSrFHRTkIgj03h3fOxWAwZm6yCJGyOm0", + "self_link": "http://localhost:9001/3.0/users/4", "user_id": 4}], "http_etag": + "\"bc23703fe51a39f9442fcc260659063b1e8e7646\"", "start": 0, "total_size": + 1}'} + headers: + content-length: ['429'] + 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/4 + response: + body: {string: !!python/unicode ''} + headers: + content-length: ['0'] + status: {code: 204, message: No Content} version: 1 diff --git a/src/postorius/tests/fixtures/vcr_cassettes/TestProfile.test_view_contains_form.yaml b/src/postorius/tests/fixtures/vcr_cassettes/TestProfile.test_view_contains_form.yaml index d5a674c..e112900 100644 --- a/src/postorius/tests/fixtures/vcr_cassettes/TestProfile.test_view_contains_form.yaml +++ b/src/postorius/tests/fixtures/vcr_cassettes/TestProfile.test_view_contains_form.yaml @@ -6,30 +6,11 @@ method: !!python/unicode GET uri: http://localhost:9001/3.0/users/les@example.org response: - body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag": - "\"f0b94bf2edd58e88d678043b4b49362ca377722e\"", "is_server_owner": false, - "password": "$6$rounds=690702$ldltgxeeAosAEu84$ypRhGVnPjh7q/JCzASdnPfc9C2lytW2mFFbTOfncE93GP9pETx6Z.Jra2.ERfCF.v/bueX6J6vvU8rWR9sCDk/", - "self_link": "http://localhost:9001/3.0/users/1", "user_id": 1}'} + body: {string: !!python/unicode 404 Not Found} headers: - content-length: ['324'] + content-length: ['13'] 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/1/addresses - response: - body: {string: !!python/unicode '{"entries": [{"email": "les@example.org", "http_etag": - "\"dc79f04b185dfcc8e220efd7e4061b4d1abb253e\"", "original_email": "les@example.org", - "registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/les@example.org", - "user": "http://localhost:9001/3.0/users/1"}], "http_etag": "\"79d13bca14b3c9c60f1392a2e3cb1847b961fe2b\"", - "start": 0, "total_size": 1}'} - headers: - content-length: ['384'] - content-type: [application/json; charset=utf-8] - status: {code: 200, message: OK} + status: {code: 404, message: Not Found} - request: body: null headers: @@ -37,12 +18,78 @@ method: !!python/unicode GET uri: http://localhost:9001/3.0/users/les@example.org 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: email=les%40example.org + headers: + accept-encoding: ['gzip, deflate'] + !!python/unicode content-type: [!!python/unicode application/x-www-form-urlencoded] + method: !!python/unicode POST + uri: http://localhost:9001/3.0/users + response: + body: {string: !!python/unicode ''} + headers: + content-length: ['0'] + location: ['http://localhost:9001/3.0/users/5'] + status: {code: 201, message: Created} +- request: + body: null + headers: + accept-encoding: ['gzip, deflate'] + method: !!python/unicode GET + uri: http://localhost:9001/3.0/users/5 + response: body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag": - "\"f0b94bf2edd58e88d678043b4b49362ca377722e\"", "is_server_owner": false, - "password": "$6$rounds=690702$ldltgxeeAosAEu84$ypRhGVnPjh7q/JCzASdnPfc9C2lytW2mFFbTOfncE93GP9pETx6Z.Jra2.ERfCF.v/bueX6J6vvU8rWR9sCDk/", - "self_link": "http://localhost:9001/3.0/users/1", "user_id": 1}'} + "\"b9c2f5b5bdabcccb0cff4b78d3cd4f16cf5c71c3\"", "is_server_owner": false, + "password": "$6$rounds=686290$uMXKSe83AtShteY/$AGl.X49.AIQDQ9j9yUSKuInfurq2n1jL9PMqkM93DWgNDrTN2o6uZQBW7s3EAEWgr3ZooDv6WBH6WPmRX0u/O0", + "self_link": "http://localhost:9001/3.0/users/5", "user_id": 5}'} headers: content-length: ['324'] 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/domains + 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/users + response: + body: {string: !!python/unicode '{"entries": [{"created_on": "2005-08-01T07:49:23", + "http_etag": "\"b9c2f5b5bdabcccb0cff4b78d3cd4f16cf5c71c3\"", "is_server_owner": + false, "password": "$6$rounds=686290$uMXKSe83AtShteY/$AGl.X49.AIQDQ9j9yUSKuInfurq2n1jL9PMqkM93DWgNDrTN2o6uZQBW7s3EAEWgr3ZooDv6WBH6WPmRX0u/O0", + "self_link": "http://localhost:9001/3.0/users/5", "user_id": 5}], "http_etag": + "\"f9ad3f14c385d71051b6ba5380fc6605d4463ae3\"", "start": 0, "total_size": + 1}'} + headers: + content-length: ['429'] + 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/5 + response: + body: {string: !!python/unicode ''} + headers: + content-length: ['0'] + status: {code: 204, message: No Content} version: 1 diff --git a/src/postorius/tests/fixtures/vcr_cassettes/TestSubscription.test_mass_subscribe.yaml b/src/postorius/tests/fixtures/vcr_cassettes/TestSubscription.test_mass_subscribe.yaml index 15f3d44..a114772 100644 --- a/src/postorius/tests/fixtures/vcr_cassettes/TestSubscription.test_mass_subscribe.yaml +++ b/src/postorius/tests/fixtures/vcr_cassettes/TestSubscription.test_mass_subscribe.yaml @@ -3,8 +3,8 @@ body: mail_host=example.com headers: accept-encoding: ['gzip, deflate'] - !!python/unicode 'content-type': [!!python/unicode 'application/x-www-form-urlencoded'] - method: !!python/unicode 'POST' + !!python/unicode content-type: [!!python/unicode application/x-www-form-urlencoded] + method: !!python/unicode POST uri: http://localhost:9001/3.0/domains response: body: {string: !!python/unicode ''} @@ -16,7 +16,7 @@ body: null headers: accept-encoding: ['gzip, deflate'] - method: !!python/unicode 'GET' + method: !!python/unicode GET uri: http://localhost:9001/3.0/domains/example.com response: body: {string: !!python/unicode '{"base_url": "http://example.com", "description": @@ -31,8 +31,8 @@ body: fqdn_listname=open_list%40example.com headers: accept-encoding: ['gzip, deflate'] - !!python/unicode 'content-type': [!!python/unicode 'application/x-www-form-urlencoded'] - method: !!python/unicode 'POST' + !!python/unicode content-type: [!!python/unicode application/x-www-form-urlencoded] + method: !!python/unicode POST uri: http://localhost:9001/3.0/lists response: body: {string: !!python/unicode ''} @@ -44,7 +44,7 @@ body: null headers: accept-encoding: ['gzip, deflate'] - method: !!python/unicode 'GET' + method: !!python/unicode GET uri: http://localhost:9001/3.0/lists/open_list.example.com response: body: {string: !!python/unicode '{"display_name": "Open_list", "fqdn_listname": @@ -60,7 +60,7 @@ body: null headers: accept-encoding: ['gzip, deflate'] - method: !!python/unicode 'GET' + method: !!python/unicode GET uri: http://localhost:9001/3.0/lists/open_list@example.com/config response: body: {string: !!python/unicode '{"acceptable_aliases": [], "admin_immed_notify": @@ -93,8 +93,8 @@ body: subscription_policy=open headers: accept-encoding: ['gzip, deflate'] - !!python/unicode 'content-type': [!!python/unicode 'application/x-www-form-urlencoded'] - method: !!python/unicode 'PATCH' + !!python/unicode content-type: [!!python/unicode application/x-www-form-urlencoded] + method: !!python/unicode PATCH uri: http://localhost:9001/3.0/lists/open_list@example.com/config response: body: {string: !!python/unicode ''} @@ -105,8 +105,8 @@ body: fqdn_listname=moderate_subs%40example.com headers: accept-encoding: ['gzip, deflate'] - !!python/unicode 'content-type': [!!python/unicode 'application/x-www-form-urlencoded'] - method: !!python/unicode 'POST' + !!python/unicode content-type: [!!python/unicode application/x-www-form-urlencoded] + method: !!python/unicode POST uri: http://localhost:9001/3.0/lists response: body: {string: !!python/unicode ''} @@ -118,7 +118,7 @@ body: null headers: accept-encoding: ['gzip, deflate'] - method: !!python/unicode 'GET' + method: !!python/unicode GET uri: http://localhost:9001/3.0/lists/moderate_subs.example.com response: body: {string: !!python/unicode '{"display_name": "Moderate_subs", "fqdn_listname": @@ -134,7 +134,7 @@ body: null headers: accept-encoding: ['gzip, deflate'] - method: !!python/unicode 'GET' + method: !!python/unicode GET uri: http://localhost:9001/3.0/lists/moderate_subs@example.com/config response: body: {string: !!python/unicode '{"acceptable_aliases": [], "admin_immed_notify": @@ -168,8 +168,8 @@ body: subscription_policy=moderate headers: accept-encoding: ['gzip, deflate'] - !!python/unicode 'content-type': [!!python/unicode 'application/x-www-form-urlencoded'] - method: !!python/unicode 'PATCH' + !!python/unicode content-type: [!!python/unicode application/x-www-form-urlencoded] + method: !!python/unicode PATCH uri: http://localhost:9001/3.0/lists/moderate_subs@example.com/config response: body: {string: !!python/unicode ''} @@ -180,22 +180,22 @@ body: email=test%40example.com headers: accept-encoding: ['gzip, deflate'] - !!python/unicode 'content-type': [!!python/unicode 'application/x-www-form-urlencoded'] - method: !!python/unicode 'POST' + !!python/unicode content-type: [!!python/unicode application/x-www-form-urlencoded] + method: !!python/unicode POST uri: http://localhost:9001/3.0/users response: body: {string: !!python/unicode ''} headers: content-length: ['0'] - location: ['http://localhost:9001/3.0/users/791'] + location: ['http://localhost:9001/3.0/users/116'] status: {code: 201, message: Created} - request: body: email=fritz%40example.org headers: accept-encoding: ['gzip, deflate'] - !!python/unicode 'content-type': [!!python/unicode 'application/x-www-form-urlencoded'] - method: !!python/unicode 'POST' - uri: http://localhost:9001/3.0/users/791/addresses + !!python/unicode content-type: [!!python/unicode application/x-www-form-urlencoded] + method: !!python/unicode POST + uri: http://localhost:9001/3.0/users/116/addresses response: body: {string: !!python/unicode ''} headers: @@ -206,7 +206,7 @@ body: null headers: accept-encoding: ['gzip, deflate'] - method: !!python/unicode 'POST' + method: !!python/unicode POST uri: http://localhost:9001/3.0/addresses/fritz@example.org/verify response: body: {string: !!python/unicode ''} @@ -217,73 +217,25 @@ body: list_id=open_list.example.com&role=owner&subscriber=owner%40example.com headers: accept-encoding: ['gzip, deflate'] - !!python/unicode 'content-type': [!!python/unicode 'application/x-www-form-urlencoded'] - method: !!python/unicode 'POST' + !!python/unicode content-type: [!!python/unicode application/x-www-form-urlencoded] + method: !!python/unicode POST uri: http://localhost:9001/3.0/members response: body: {string: !!python/unicode ''} headers: content-length: ['0'] - location: ['http://localhost:9001/3.0/members/1883'] - status: {code: 201, message: Created} -- request: - body: email=kane%40example.org - headers: - accept-encoding: ['gzip, deflate'] - !!python/unicode 'content-type': [!!python/unicode 'application/x-www-form-urlencoded'] - method: !!python/unicode 'POST' - uri: http://localhost:9001/3.0/users/791/addresses - response: - body: {string: !!python/unicode ''} - headers: - content-length: ['0'] - location: ['http://localhost:9001/3.0/addresses/kane@example.org'] + location: ['http://localhost:9001/3.0/members/102'] status: {code: 201, message: Created} - request: body: null headers: accept-encoding: ['gzip, deflate'] - method: !!python/unicode 'POST' - uri: http://localhost:9001/3.0/addresses/kane@example.org/verify - response: - body: {string: !!python/unicode ''} - headers: - content-length: ['0'] - status: {code: 204, message: No Content} -- request: - body: email=abel%40example.org - headers: - accept-encoding: ['gzip, deflate'] - !!python/unicode 'content-type': [!!python/unicode 'application/x-www-form-urlencoded'] - method: !!python/unicode 'POST' - uri: http://localhost:9001/3.0/users/791/addresses - response: - body: {string: !!python/unicode ''} - headers: - content-length: ['0'] - location: ['http://localhost:9001/3.0/addresses/abel@example.org'] - status: {code: 201, message: Created} -- request: - body: null - headers: - accept-encoding: ['gzip, deflate'] - method: !!python/unicode 'POST' - uri: http://localhost:9001/3.0/addresses/abel@example.org/verify - 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' + method: !!python/unicode GET uri: http://localhost:9001/3.0/users/owner@example.com response: body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag": - "\"978a716bd2fdac7229a2329c84719c4769432b23\"", "is_server_owner": false, - "self_link": "http://localhost:9001/3.0/users/792", "user_id": 792}'} + "\"d87649f27b1fac7ffd78a81e3665ac8ed67c18a1\"", "is_server_owner": false, + "self_link": "http://localhost:9001/3.0/users/117", "user_id": 117}'} headers: content-length: ['192'] content-type: [application/json; charset=utf-8] @@ -292,13 +244,13 @@ body: null headers: accept-encoding: ['gzip, deflate'] - method: !!python/unicode 'GET' - uri: http://localhost:9001/3.0/users/792/addresses + method: !!python/unicode GET + uri: http://localhost:9001/3.0/users/117/addresses response: body: {string: !!python/unicode '{"entries": [{"email": "owner@example.com", "http_etag": - "\"ec2d8ce39b559903cb77a9600492b90dd6cf9940\"", "original_email": "owner@example.com", + "\"4a74dd95da7be7fd25be4fa36e8a107642b984e1\"", "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/792"}], "http_etag": "\"9d73963e544313d8f078e8ee6a2247b167917a1d\"", + "user": "http://localhost:9001/3.0/users/117"}], "http_etag": "\"56f95715c4094007028818cf6551481697be492a\"", "start": 0, "total_size": 1}'} headers: content-length: ['392'] @@ -308,7 +260,7 @@ body: null headers: accept-encoding: ['gzip, deflate'] - method: !!python/unicode 'GET' + method: !!python/unicode GET uri: http://localhost:9001/3.0/lists/open_list.example.com response: body: {string: !!python/unicode '{"display_name": "Open_list", "fqdn_listname": @@ -324,24 +276,24 @@ body: null headers: accept-encoding: ['gzip, deflate'] - method: !!python/unicode 'GET' + method: !!python/unicode GET uri: http://localhost:9001/3.0/lists/open_list.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": "\"1a781e5fbe7a28e4407456543e901f412e3be73b\"", - "list_id": "open_list.example.com", "member_id": 1883, "moderation_action": - "accept", "role": "owner", "self_link": "http://localhost:9001/3.0/members/1883", - "user": "http://localhost:9001/3.0/users/792"}], "http_etag": "\"7f7c9dc5a21641766165f90eab2628e0370da4dc\"", + "delivery_mode": "regular", "email": "owner@example.com", "http_etag": "\"31dd23429e97f811eadd1da51c4a40cd24ba3620\"", + "list_id": "open_list.example.com", "member_id": 102, "moderation_action": + "accept", "role": "owner", "self_link": "http://localhost:9001/3.0/members/102", + "user": "http://localhost:9001/3.0/users/117"}], "http_etag": "\"526adddb41f77b50169f14b2dfc9ec994c13359d\"", "start": 0, "total_size": 1}'} headers: - content-length: ['497'] + content-length: ['495'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: body: null headers: accept-encoding: ['gzip, deflate'] - method: !!python/unicode 'GET' + method: !!python/unicode GET uri: http://localhost:9001/3.0/lists/open_list.example.com/roster/moderator response: body: {string: !!python/unicode '{"http_etag": "\"32223434a0f3af4cdc4673d1fbc5bac1f6d98fd3\"", @@ -354,7 +306,7 @@ body: null headers: accept-encoding: ['gzip, deflate'] - method: !!python/unicode 'GET' + method: !!python/unicode GET uri: http://localhost:9001/3.0/lists/open_list.example.com response: body: {string: !!python/unicode '{"display_name": "Open_list", "fqdn_listname": @@ -370,71 +322,71 @@ body: display_name=None&list_id=open_list.example.com&pre_approved=True&pre_confirmed=True&pre_verified=True&subscriber=fritz%40example.org headers: accept-encoding: ['gzip, deflate'] - !!python/unicode 'content-type': [!!python/unicode 'application/x-www-form-urlencoded'] - method: !!python/unicode 'POST' + !!python/unicode content-type: [!!python/unicode application/x-www-form-urlencoded] + method: !!python/unicode POST uri: http://localhost:9001/3.0/members response: body: {string: !!python/unicode ''} headers: content-length: ['0'] - location: ['http://localhost:9001/3.0/members/1884'] + location: ['http://localhost:9001/3.0/members/103'] status: {code: 201, message: Created} - request: body: display_name=None&list_id=open_list.example.com&pre_approved=True&pre_confirmed=True&pre_verified=True&subscriber=kane%40example.org headers: accept-encoding: ['gzip, deflate'] - !!python/unicode 'content-type': [!!python/unicode 'application/x-www-form-urlencoded'] - method: !!python/unicode 'POST' + !!python/unicode content-type: [!!python/unicode application/x-www-form-urlencoded] + method: !!python/unicode POST uri: http://localhost:9001/3.0/members response: body: {string: !!python/unicode ''} headers: content-length: ['0'] - location: ['http://localhost:9001/3.0/members/1885'] + location: ['http://localhost:9001/3.0/members/104'] status: {code: 201, message: Created} - request: body: display_name=None&list_id=open_list.example.com&pre_approved=True&pre_confirmed=True&pre_verified=True&subscriber=abel%40example.org headers: accept-encoding: ['gzip, deflate'] - !!python/unicode 'content-type': [!!python/unicode 'application/x-www-form-urlencoded'] - method: !!python/unicode 'POST' + !!python/unicode content-type: [!!python/unicode application/x-www-form-urlencoded] + method: !!python/unicode POST uri: http://localhost:9001/3.0/members response: body: {string: !!python/unicode ''} headers: content-length: ['0'] - location: ['http://localhost:9001/3.0/members/1886'] + location: ['http://localhost:9001/3.0/members/105'] status: {code: 201, message: Created} - request: body: null headers: accept-encoding: ['gzip, deflate'] - method: !!python/unicode 'GET' + method: !!python/unicode GET uri: http://localhost:9001/3.0/lists/open_list@example.com/roster/member response: body: {string: !!python/unicode '{"entries": [{"address": "http://localhost:9001/3.0/addresses/abel@example.org", - "delivery_mode": "regular", "email": "abel@example.org", "http_etag": "\"32b53ad20fd1050b506aaa008b835bb1ca32c8d8\"", - "list_id": "open_list.example.com", "member_id": 1886, "moderation_action": - "defer", "role": "member", "self_link": "http://localhost:9001/3.0/members/1886", - "user": "http://localhost:9001/3.0/users/791"}, {"address": "http://localhost:9001/3.0/addresses/fritz@example.org", - "delivery_mode": "regular", "email": "fritz@example.org", "http_etag": "\"d33df8ac567381bfed477f4f3b15d80c2c8eb8c1\"", - "list_id": "open_list.example.com", "member_id": 1884, "moderation_action": - "defer", "role": "member", "self_link": "http://localhost:9001/3.0/members/1884", - "user": "http://localhost:9001/3.0/users/791"}, {"address": "http://localhost:9001/3.0/addresses/kane@example.org", - "delivery_mode": "regular", "email": "kane@example.org", "http_etag": "\"041a929cb61734f97828432909ad8f8119bbd8ad\"", - "list_id": "open_list.example.com", "member_id": 1885, "moderation_action": - "defer", "role": "member", "self_link": "http://localhost:9001/3.0/members/1885", - "user": "http://localhost:9001/3.0/users/791"}], "http_etag": "\"768c084d3fb6679403e28163b532167d3ad8125c\"", - "start": 0, "total_size": 3}'} + "delivery_mode": "regular", "email": "abel@example.org", "http_etag": "\"a825cc5d667859eecb93e79e19e6980737aade08\"", + "list_id": "open_list.example.com", "member_id": 105, "role": "member", "self_link": + "http://localhost:9001/3.0/members/105", "user": "http://localhost:9001/3.0/users/119"}, + {"address": "http://localhost:9001/3.0/addresses/fritz@example.org", "delivery_mode": + "regular", "email": "fritz@example.org", "http_etag": "\"6f4927c6ce43fdc71b28f7d827d3fc56c2c9d3d1\"", + "list_id": "open_list.example.com", "member_id": 103, "role": "member", "self_link": + "http://localhost:9001/3.0/members/103", "user": "http://localhost:9001/3.0/users/116"}, + {"address": "http://localhost:9001/3.0/addresses/kane@example.org", "delivery_mode": + "regular", "email": "kane@example.org", "http_etag": "\"50d0dda902a59afa476aeb81dc3c94713136eb14\"", + "list_id": "open_list.example.com", "member_id": 104, "role": "member", "self_link": + "http://localhost:9001/3.0/members/104", "user": "http://localhost:9001/3.0/users/118"}], + "http_etag": "\"958d2083039cdc2734d0af2e45de8e738a383b07\"", "start": 0, "total_size": + 3}'} headers: - content-length: ['1281'] + content-length: ['1185'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: body: null headers: accept-encoding: ['gzip, deflate'] - method: !!python/unicode 'GET' + method: !!python/unicode GET uri: http://localhost:9001/3.0/lists/open_list@example.com/requests response: body: {string: !!python/unicode '{"http_etag": "\"32223434a0f3af4cdc4673d1fbc5bac1f6d98fd3\"", @@ -447,7 +399,7 @@ body: null headers: accept-encoding: ['gzip, deflate'] - method: !!python/unicode 'GET' + method: !!python/unicode GET uri: http://localhost:9001/3.0/lists/moderate_subs@example.com/requests response: body: {string: !!python/unicode '{"http_etag": "\"32223434a0f3af4cdc4673d1fbc5bac1f6d98fd3\"", @@ -460,44 +412,96 @@ body: null headers: accept-encoding: ['gzip, deflate'] - method: !!python/unicode 'DELETE' - uri: http://localhost:9001/3.0/lists/open_list@example.com + method: !!python/unicode GET + uri: http://localhost:9001/3.0/domains response: - body: {string: !!python/unicode ''} + body: {string: !!python/unicode '{"entries": [{"base_url": "http://example.com", + "description": null, "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", + "mail_host": "example.com", "self_link": "http://localhost:9001/3.0/domains/example.com", + "url_host": "example.com"}], "http_etag": "\"c385b155f8da284bf78dbe075e20f58a30c893ab\"", + "start": 0, "total_size": 1}'} headers: - content-length: ['0'] - status: {code: 204, message: No Content} + content-length: ['338'] + 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/moderate_subs@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/users/791 - 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' + method: !!python/unicode DELETE uri: http://localhost:9001/3.0/domains/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 + response: + body: {string: !!python/unicode '{"entries": [{"created_on": "2005-08-01T07:49:23", + "http_etag": "\"7054947398d22d30c663dd88c246cc386f7cf4a2\"", "is_server_owner": + false, "password": "$6$rounds=687047$tX2PoFb7qjC1/gVT$/tQ1tXgmDZOYvtB57yKdzp7JSaqizhLE1KGRDdse004dhs4WiAJusE5ZaSRySrc/FOc1OwYzdLi7/YWDt6mfp/", + "self_link": "http://localhost:9001/3.0/users/116", "user_id": 116}, {"created_on": + "2005-08-01T07:49:23", "http_etag": "\"d87649f27b1fac7ffd78a81e3665ac8ed67c18a1\"", + "is_server_owner": false, "self_link": "http://localhost:9001/3.0/users/117", + "user_id": 117}, {"created_on": "2005-08-01T07:49:23", "display_name": "None", + "http_etag": "\"dbc5e6ae3e2e8a49b5a0bb69fabb6c9a0e1592be\"", "is_server_owner": + false, "self_link": "http://localhost:9001/3.0/users/118", "user_id": 118}, + {"created_on": "2005-08-01T07:49:23", "display_name": "None", "http_etag": + "\"c0b7290b786d2a0fa18d8e1f45328ad867b1f2e6\"", "is_server_owner": false, + "self_link": "http://localhost:9001/3.0/users/119", "user_id": 119}], "http_etag": + "\"1dbbdf5234cbf90e58e4c65e1606104cff309cc8\"", "start": 0, "total_size": + 4}'} + headers: + content-length: ['1063'] + 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/116 + 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/117 + 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/118 + 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/119 + response: + body: {string: !!python/unicode ''} + headers: + content-length: ['0'] + status: {code: 204, message: No Content} version: 1 diff --git a/src/postorius/tests/fixtures/vcr_cassettes/TestSubscription.test_secondary_mod.yaml b/src/postorius/tests/fixtures/vcr_cassettes/TestSubscription.test_secondary_mod.yaml index bfa84f7..23532df 100644 --- a/src/postorius/tests/fixtures/vcr_cassettes/TestSubscription.test_secondary_mod.yaml +++ b/src/postorius/tests/fixtures/vcr_cassettes/TestSubscription.test_secondary_mod.yaml @@ -187,7 +187,7 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - location: ['http://localhost:9001/3.0/users/36'] + location: ['http://localhost:9001/3.0/users/120'] status: {code: 201, message: Created} - request: body: email=fritz%40example.org @@ -195,7 +195,7 @@ accept-encoding: ['gzip, deflate'] !!python/unicode content-type: [!!python/unicode application/x-www-form-urlencoded] method: !!python/unicode POST - uri: http://localhost:9001/3.0/users/36/addresses + uri: http://localhost:9001/3.0/users/120/addresses response: body: {string: !!python/unicode ''} headers: @@ -221,11 +221,11 @@ uri: http://localhost:9001/3.0/users/test@example.com response: body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag": - "\"58c11cd1a6d53d4528d2f27b6f984a60c29eb7da\"", "is_server_owner": false, - "password": "$6$rounds=611372$MRX31NlwjE8FVEak$vSOGeFtGH6Xm73nM7F4ZuOAokkRZKoPcL34vdAUM41z0s2FdD5qFfbuJy6ZM1NTC25ZVwHO2gaYsWdlDyrxvL/", - "self_link": "http://localhost:9001/3.0/users/36", "user_id": 36}'} + "\"f86cc8f4668c8cb7205d96054101b8b55d8a34af\"", "is_server_owner": false, + "password": "$6$rounds=698743$0mNF8cbyGN9MTjLd$l5iJNNgk87QdIy5AMd9.RUHGOqmTiqqptQh300YaSQmntYfU/0kaNpr.HzGk4VRjVb4q7RBfiv8CGZQS9A9Yo0", + "self_link": "http://localhost:9001/3.0/users/120", "user_id": 120}'} headers: - content-length: ['326'] + content-length: ['328'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -233,19 +233,19 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode GET - uri: http://localhost:9001/3.0/users/36/addresses + uri: http://localhost:9001/3.0/users/120/addresses response: body: {string: !!python/unicode '{"entries": [{"email": "fritz@example.org", "http_etag": - "\"6435dfc820ba8d2f8ccbbd49d1afb3e099054cde\"", "original_email": "fritz@example.org", + "\"079578d46403c4c04c72e3adc6e3ac033bbc0ffd\"", "original_email": "fritz@example.org", "registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/fritz@example.org", - "user": "http://localhost:9001/3.0/users/36", "verified_on": "2005-08-01T07:49:23"}, - {"email": "test@example.com", "http_etag": "\"c9ce891e79c54eaca1b0fc84a1b1250d5dcf3f77\"", + "user": "http://localhost:9001/3.0/users/120", "verified_on": "2005-08-01T07:49:23"}, + {"email": "test@example.com", "http_etag": "\"e52deb688dc78468309d52e3e835f06f9c8c1b58\"", "original_email": "test@example.com", "registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/test@example.com", "user": - "http://localhost:9001/3.0/users/36"}], "http_etag": "\"d7797c84be34b8423d005bc11b2fc9a8a4d2b570\"", + "http://localhost:9001/3.0/users/120"}], "http_etag": "\"3331330ec07f916a8c07c688c3712b4372ed9b87\"", "start": 0, "total_size": 2}'} headers: - content-length: ['714'] + content-length: ['716'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -341,11 +341,11 @@ uri: http://localhost:9001/3.0/users/test@example.com response: body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag": - "\"58c11cd1a6d53d4528d2f27b6f984a60c29eb7da\"", "is_server_owner": false, - "password": "$6$rounds=611372$MRX31NlwjE8FVEak$vSOGeFtGH6Xm73nM7F4ZuOAokkRZKoPcL34vdAUM41z0s2FdD5qFfbuJy6ZM1NTC25ZVwHO2gaYsWdlDyrxvL/", - "self_link": "http://localhost:9001/3.0/users/36", "user_id": 36}'} + "\"f86cc8f4668c8cb7205d96054101b8b55d8a34af\"", "is_server_owner": false, + "password": "$6$rounds=698743$0mNF8cbyGN9MTjLd$l5iJNNgk87QdIy5AMd9.RUHGOqmTiqqptQh300YaSQmntYfU/0kaNpr.HzGk4VRjVb4q7RBfiv8CGZQS9A9Yo0", + "self_link": "http://localhost:9001/3.0/users/120", "user_id": 120}'} headers: - content-length: ['326'] + content-length: ['328'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -353,19 +353,19 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode GET - uri: http://localhost:9001/3.0/users/36/addresses + uri: http://localhost:9001/3.0/users/120/addresses response: body: {string: !!python/unicode '{"entries": [{"email": "fritz@example.org", "http_etag": - "\"6435dfc820ba8d2f8ccbbd49d1afb3e099054cde\"", "original_email": "fritz@example.org", + "\"079578d46403c4c04c72e3adc6e3ac033bbc0ffd\"", "original_email": "fritz@example.org", "registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/fritz@example.org", - "user": "http://localhost:9001/3.0/users/36", "verified_on": "2005-08-01T07:49:23"}, - {"email": "test@example.com", "http_etag": "\"c9ce891e79c54eaca1b0fc84a1b1250d5dcf3f77\"", + "user": "http://localhost:9001/3.0/users/120", "verified_on": "2005-08-01T07:49:23"}, + {"email": "test@example.com", "http_etag": "\"e52deb688dc78468309d52e3e835f06f9c8c1b58\"", "original_email": "test@example.com", "registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/test@example.com", "user": - "http://localhost:9001/3.0/users/36"}], "http_etag": "\"d7797c84be34b8423d005bc11b2fc9a8a4d2b570\"", + "http://localhost:9001/3.0/users/120"}], "http_etag": "\"3331330ec07f916a8c07c688c3712b4372ed9b87\"", "start": 0, "total_size": 2}'} headers: - content-length: ['714'] + content-length: ['716'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -513,35 +513,18 @@ body: null headers: accept-encoding: ['gzip, deflate'] - method: !!python/unicode DELETE - uri: http://localhost:9001/3.0/lists/open_list@example.com + method: !!python/unicode GET + uri: http://localhost:9001/3.0/domains response: - body: {string: !!python/unicode ''} + body: {string: !!python/unicode '{"entries": [{"base_url": "http://example.com", + "description": null, "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", + "mail_host": "example.com", "self_link": "http://localhost:9001/3.0/domains/example.com", + "url_host": "example.com"}], "http_etag": "\"c385b155f8da284bf78dbe075e20f58a30c893ab\"", + "start": 0, "total_size": 1}'} 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/moderate_subs@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/users/36 - response: - body: {string: !!python/unicode ''} - headers: - content-length: ['0'] - status: {code: 204, message: No Content} + content-length: ['338'] + content-type: [application/json; charset=utf-8] + status: {code: 200, message: OK} - request: body: null headers: @@ -553,4 +536,32 @@ 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 + response: + body: {string: !!python/unicode '{"entries": [{"created_on": "2005-08-01T07:49:23", + "http_etag": "\"f86cc8f4668c8cb7205d96054101b8b55d8a34af\"", "is_server_owner": + false, "password": "$6$rounds=698743$0mNF8cbyGN9MTjLd$l5iJNNgk87QdIy5AMd9.RUHGOqmTiqqptQh300YaSQmntYfU/0kaNpr.HzGk4VRjVb4q7RBfiv8CGZQS9A9Yo0", + "self_link": "http://localhost:9001/3.0/users/120", "user_id": 120}], "http_etag": + "\"6011d350565ac72e6acfe9ee418105acadb02ea4\"", "start": 0, "total_size": + 1}'} + headers: + content-length: ['433'] + 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/120 + response: + body: {string: !!python/unicode ''} + headers: + content-length: ['0'] + status: {code: 204, message: No Content} version: 1 diff --git a/src/postorius/tests/fixtures/vcr_cassettes/TestSubscription.test_secondary_open.yaml b/src/postorius/tests/fixtures/vcr_cassettes/TestSubscription.test_secondary_open.yaml index 42e8092..36a4005 100644 --- a/src/postorius/tests/fixtures/vcr_cassettes/TestSubscription.test_secondary_open.yaml +++ b/src/postorius/tests/fixtures/vcr_cassettes/TestSubscription.test_secondary_open.yaml @@ -187,7 +187,7 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - location: ['http://localhost:9001/3.0/users/37'] + location: ['http://localhost:9001/3.0/users/121'] status: {code: 201, message: Created} - request: body: email=fritz%40example.org @@ -195,7 +195,7 @@ accept-encoding: ['gzip, deflate'] !!python/unicode content-type: [!!python/unicode application/x-www-form-urlencoded] method: !!python/unicode POST - uri: http://localhost:9001/3.0/users/37/addresses + uri: http://localhost:9001/3.0/users/121/addresses response: body: {string: !!python/unicode ''} headers: @@ -221,11 +221,11 @@ uri: http://localhost:9001/3.0/users/test@example.com response: body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag": - "\"18ee746b94ca62da81a25bac8e7bd4f1f2dd69c7\"", "is_server_owner": false, - "password": "$6$rounds=708617$Fa5J.mtnMglRbnzA$5x/zuvHOizn8MFnVBz3UUKczqiiMzm5WFoSzlsZYSMWVHdlBw8LeHzaPqzV0ranBBFJDcB1TDzUbayeKjqTkZ.", - "self_link": "http://localhost:9001/3.0/users/37", "user_id": 37}'} + "\"da580436b3678aaf11186eefd19f1fd036d20bdb\"", "is_server_owner": false, + "password": "$6$rounds=652497$Ky7AXWjmBkJcW6N.$6eyXKmZLLFni0JpVgun3ziCaDVv00U79xwBCYelOdqkgcY1KvLkbqAf0TctDqYnZoZuAmblunGgsQjNiNU8aD.", + "self_link": "http://localhost:9001/3.0/users/121", "user_id": 121}'} headers: - content-length: ['326'] + content-length: ['328'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -233,19 +233,19 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode GET - uri: http://localhost:9001/3.0/users/37/addresses + uri: http://localhost:9001/3.0/users/121/addresses response: body: {string: !!python/unicode '{"entries": [{"email": "fritz@example.org", "http_etag": - "\"f81a41eee9ccfd3d3b327f2571e8846e2b47388f\"", "original_email": "fritz@example.org", + "\"4eddc2721fc617b79298ac2621da296ee2add3cc\"", "original_email": "fritz@example.org", "registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/fritz@example.org", - "user": "http://localhost:9001/3.0/users/37", "verified_on": "2005-08-01T07:49:23"}, - {"email": "test@example.com", "http_etag": "\"2b6cb0f2a91c67ba93a55ed62f8633cd211ca7f0\"", + "user": "http://localhost:9001/3.0/users/121", "verified_on": "2005-08-01T07:49:23"}, + {"email": "test@example.com", "http_etag": "\"f8fbda30df77dec633f08addd3c5c95b5edd0fce\"", "original_email": "test@example.com", "registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/test@example.com", "user": - "http://localhost:9001/3.0/users/37"}], "http_etag": "\"f3c86a250053b63a009d452674044ebccf4cbf7e\"", + "http://localhost:9001/3.0/users/121"}], "http_etag": "\"7483137d8d905a90e798883092c13a3560f697a3\"", "start": 0, "total_size": 2}'} headers: - content-length: ['714'] + content-length: ['716'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -301,7 +301,7 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - location: ['http://localhost:9001/3.0/members/102'] + location: ['http://localhost:9001/3.0/members/106'] status: {code: 201, message: Created} - request: body: null @@ -311,13 +311,13 @@ uri: http://localhost:9001/3.0/lists/open_list@example.com/roster/member response: body: {string: !!python/unicode '{"entries": [{"address": "http://localhost:9001/3.0/addresses/fritz@example.org", - "delivery_mode": "regular", "email": "fritz@example.org", "http_etag": "\"31b906d70ffb1343b297087b0f25de5af784acb5\"", - "list_id": "open_list.example.com", "member_id": 102, "moderation_action": - "defer", "role": "member", "self_link": "http://localhost:9001/3.0/members/102", - "user": "http://localhost:9001/3.0/users/37"}], "http_etag": "\"fedc8ff71b0b74e7876fade0700fc01317e875ef\"", - "start": 0, "total_size": 1}'} + "delivery_mode": "regular", "email": "fritz@example.org", "http_etag": "\"ddbc061cfd7b0a0d5f64379e5fa9a9cc492c1e09\"", + "list_id": "open_list.example.com", "member_id": 106, "role": "member", "self_link": + "http://localhost:9001/3.0/members/106", "user": "http://localhost:9001/3.0/users/121"}], + "http_etag": "\"cccc6f02d0be69c367f247a58151196654ee5908\"", "start": 0, "total_size": + 1}'} headers: - content-length: ['494'] + content-length: ['465'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -341,11 +341,11 @@ uri: http://localhost:9001/3.0/users/test@example.com response: body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag": - "\"18ee746b94ca62da81a25bac8e7bd4f1f2dd69c7\"", "is_server_owner": false, - "password": "$6$rounds=708617$Fa5J.mtnMglRbnzA$5x/zuvHOizn8MFnVBz3UUKczqiiMzm5WFoSzlsZYSMWVHdlBw8LeHzaPqzV0ranBBFJDcB1TDzUbayeKjqTkZ.", - "self_link": "http://localhost:9001/3.0/users/37", "user_id": 37}'} + "\"da580436b3678aaf11186eefd19f1fd036d20bdb\"", "is_server_owner": false, + "password": "$6$rounds=652497$Ky7AXWjmBkJcW6N.$6eyXKmZLLFni0JpVgun3ziCaDVv00U79xwBCYelOdqkgcY1KvLkbqAf0TctDqYnZoZuAmblunGgsQjNiNU8aD.", + "self_link": "http://localhost:9001/3.0/users/121", "user_id": 121}'} headers: - content-length: ['326'] + content-length: ['328'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -353,19 +353,19 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode GET - uri: http://localhost:9001/3.0/users/37/addresses + uri: http://localhost:9001/3.0/users/121/addresses response: body: {string: !!python/unicode '{"entries": [{"email": "fritz@example.org", "http_etag": - "\"f81a41eee9ccfd3d3b327f2571e8846e2b47388f\"", "original_email": "fritz@example.org", + "\"4eddc2721fc617b79298ac2621da296ee2add3cc\"", "original_email": "fritz@example.org", "registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/fritz@example.org", - "user": "http://localhost:9001/3.0/users/37", "verified_on": "2005-08-01T07:49:23"}, - {"email": "test@example.com", "http_etag": "\"2b6cb0f2a91c67ba93a55ed62f8633cd211ca7f0\"", + "user": "http://localhost:9001/3.0/users/121", "verified_on": "2005-08-01T07:49:23"}, + {"email": "test@example.com", "http_etag": "\"f8fbda30df77dec633f08addd3c5c95b5edd0fce\"", "original_email": "test@example.com", "registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/test@example.com", "user": - "http://localhost:9001/3.0/users/37"}], "http_etag": "\"f3c86a250053b63a009d452674044ebccf4cbf7e\"", + "http://localhost:9001/3.0/users/121"}], "http_etag": "\"7483137d8d905a90e798883092c13a3560f697a3\"", "start": 0, "total_size": 2}'} headers: - content-length: ['714'] + content-length: ['716'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -430,12 +430,11 @@ uri: http://localhost:9001/3.0/lists/open_list.example.com/member/fritz@example.org response: body: {string: !!python/unicode '{"address": "http://localhost:9001/3.0/addresses/fritz@example.org", - "delivery_mode": "regular", "email": "fritz@example.org", "http_etag": "\"31b906d70ffb1343b297087b0f25de5af784acb5\"", - "list_id": "open_list.example.com", "member_id": 102, "moderation_action": - "defer", "role": "member", "self_link": "http://localhost:9001/3.0/members/102", - "user": "http://localhost:9001/3.0/users/37"}'} + "delivery_mode": "regular", "email": "fritz@example.org", "http_etag": "\"ddbc061cfd7b0a0d5f64379e5fa9a9cc492c1e09\"", + "list_id": "open_list.example.com", "member_id": 106, "role": "member", "self_link": + "http://localhost:9001/3.0/members/106", "user": "http://localhost:9001/3.0/users/121"}'} headers: - content-length: ['389'] + content-length: ['360'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -501,35 +500,18 @@ body: null headers: accept-encoding: ['gzip, deflate'] - method: !!python/unicode DELETE - uri: http://localhost:9001/3.0/lists/open_list@example.com + method: !!python/unicode GET + uri: http://localhost:9001/3.0/domains response: - body: {string: !!python/unicode ''} + body: {string: !!python/unicode '{"entries": [{"base_url": "http://example.com", + "description": null, "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", + "mail_host": "example.com", "self_link": "http://localhost:9001/3.0/domains/example.com", + "url_host": "example.com"}], "http_etag": "\"c385b155f8da284bf78dbe075e20f58a30c893ab\"", + "start": 0, "total_size": 1}'} 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/moderate_subs@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/users/37 - response: - body: {string: !!python/unicode ''} - headers: - content-length: ['0'] - status: {code: 204, message: No Content} + content-length: ['338'] + content-type: [application/json; charset=utf-8] + status: {code: 200, message: OK} - request: body: null headers: @@ -541,4 +523,32 @@ 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 + response: + body: {string: !!python/unicode '{"entries": [{"created_on": "2005-08-01T07:49:23", + "http_etag": "\"da580436b3678aaf11186eefd19f1fd036d20bdb\"", "is_server_owner": + false, "password": "$6$rounds=652497$Ky7AXWjmBkJcW6N.$6eyXKmZLLFni0JpVgun3ziCaDVv00U79xwBCYelOdqkgcY1KvLkbqAf0TctDqYnZoZuAmblunGgsQjNiNU8aD.", + "self_link": "http://localhost:9001/3.0/users/121", "user_id": 121}], "http_etag": + "\"22ee67dda81d7967ae507dea16e61a941aaa58ef\"", "start": 0, "total_size": + 1}'} + headers: + content-length: ['433'] + 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/121 + response: + body: {string: !!python/unicode ''} + headers: + content-length: ['0'] + status: {code: 204, message: No Content} version: 1 diff --git a/src/postorius/tests/fixtures/vcr_cassettes/TestSubscription.test_subscribe_mod.yaml b/src/postorius/tests/fixtures/vcr_cassettes/TestSubscription.test_subscribe_mod.yaml index 8255811..79334bb 100644 --- a/src/postorius/tests/fixtures/vcr_cassettes/TestSubscription.test_subscribe_mod.yaml +++ b/src/postorius/tests/fixtures/vcr_cassettes/TestSubscription.test_subscribe_mod.yaml @@ -187,7 +187,7 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - location: ['http://localhost:9001/3.0/users/38'] + location: ['http://localhost:9001/3.0/users/122'] status: {code: 201, message: Created} - request: body: email=fritz%40example.org @@ -195,7 +195,7 @@ accept-encoding: ['gzip, deflate'] !!python/unicode content-type: [!!python/unicode application/x-www-form-urlencoded] method: !!python/unicode POST - uri: http://localhost:9001/3.0/users/38/addresses + uri: http://localhost:9001/3.0/users/122/addresses response: body: {string: !!python/unicode ''} headers: @@ -221,11 +221,11 @@ uri: http://localhost:9001/3.0/users/test@example.com response: body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag": - "\"f55b6d2cdb24a4220514d508022d7fbeb794e565\"", "is_server_owner": false, - "password": "$6$rounds=665526$W5HrBWCgyh7X5CEl$VvAE2Mu8AbJKwl8cnR9sDm/2zMVuhON/ruvweIlHQ/inm0TDQHbDUx54zsBiOIMsWezvyropNcF6MC6rtK4bu/", - "self_link": "http://localhost:9001/3.0/users/38", "user_id": 38}'} + "\"721554143804444b7566bedff05c98352bbe43a1\"", "is_server_owner": false, + "password": "$6$rounds=597357$KK4dxc9s3RQkNOjg$.p79951iXVUX5vONPrwFQjS8gk4EA8Msv16TsiiQJlKmyYBHJWlxdTEKEBnYqxQ.fEg9wqyfRHz.a0v4YLwY91", + "self_link": "http://localhost:9001/3.0/users/122", "user_id": 122}'} headers: - content-length: ['326'] + content-length: ['328'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -233,19 +233,19 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode GET - uri: http://localhost:9001/3.0/users/38/addresses + uri: http://localhost:9001/3.0/users/122/addresses response: body: {string: !!python/unicode '{"entries": [{"email": "fritz@example.org", "http_etag": - "\"1a3be368b8beef3dd371c272fb26140604c0bca1\"", "original_email": "fritz@example.org", + "\"60202ff1ed84efbfbfefa33375c637a34552dbf8\"", "original_email": "fritz@example.org", "registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/fritz@example.org", - "user": "http://localhost:9001/3.0/users/38", "verified_on": "2005-08-01T07:49:23"}, - {"email": "test@example.com", "http_etag": "\"df7343d5507957b6386cbbeab0f19495cfce4a58\"", + "user": "http://localhost:9001/3.0/users/122", "verified_on": "2005-08-01T07:49:23"}, + {"email": "test@example.com", "http_etag": "\"16c12d3da544699b5e19b608b7fed8f15520fd57\"", "original_email": "test@example.com", "registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/test@example.com", "user": - "http://localhost:9001/3.0/users/38"}], "http_etag": "\"bc00aa3303b0579022c9ec27d3b350b752a9dc1b\"", + "http://localhost:9001/3.0/users/122"}], "http_etag": "\"6a239c8e850f5f65459b9ddaf2357c1d99a10d40\"", "start": 0, "total_size": 2}'} headers: - content-length: ['714'] + content-length: ['716'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -341,11 +341,11 @@ uri: http://localhost:9001/3.0/users/test@example.com response: body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag": - "\"f55b6d2cdb24a4220514d508022d7fbeb794e565\"", "is_server_owner": false, - "password": "$6$rounds=665526$W5HrBWCgyh7X5CEl$VvAE2Mu8AbJKwl8cnR9sDm/2zMVuhON/ruvweIlHQ/inm0TDQHbDUx54zsBiOIMsWezvyropNcF6MC6rtK4bu/", - "self_link": "http://localhost:9001/3.0/users/38", "user_id": 38}'} + "\"721554143804444b7566bedff05c98352bbe43a1\"", "is_server_owner": false, + "password": "$6$rounds=597357$KK4dxc9s3RQkNOjg$.p79951iXVUX5vONPrwFQjS8gk4EA8Msv16TsiiQJlKmyYBHJWlxdTEKEBnYqxQ.fEg9wqyfRHz.a0v4YLwY91", + "self_link": "http://localhost:9001/3.0/users/122", "user_id": 122}'} headers: - content-length: ['326'] + content-length: ['328'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -353,20 +353,20 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode GET - uri: http://localhost:9001/3.0/users/38/addresses + uri: http://localhost:9001/3.0/users/122/addresses response: body: {string: !!python/unicode '{"entries": [{"email": "fritz@example.org", "http_etag": - "\"1a3be368b8beef3dd371c272fb26140604c0bca1\"", "original_email": "fritz@example.org", + "\"60202ff1ed84efbfbfefa33375c637a34552dbf8\"", "original_email": "fritz@example.org", "registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/fritz@example.org", - "user": "http://localhost:9001/3.0/users/38", "verified_on": "2005-08-01T07:49:23"}, - {"email": "test@example.com", "http_etag": "\"f130591ed82ad571a456d5bbc427eb8beef38cfc\"", + "user": "http://localhost:9001/3.0/users/122", "verified_on": "2005-08-01T07:49:23"}, + {"email": "test@example.com", "http_etag": "\"ad2c899eeda3ab9e3562049351f2fdc0c9baba9c\"", "original_email": "test@example.com", "registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/test@example.com", "user": - "http://localhost:9001/3.0/users/38", "verified_on": "2005-08-01T07:49:23"}], - "http_etag": "\"59a482538be7786e4cbfd604b6d3ecda6b4623f8\"", "start": 0, "total_size": + "http://localhost:9001/3.0/users/122", "verified_on": "2005-08-01T07:49:23"}], + "http_etag": "\"ad5bf38a5093e093847afd73faa8c88d3da89464\"", "start": 0, "total_size": 2}'} headers: - content-length: ['752'] + content-length: ['754'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -514,35 +514,18 @@ body: null headers: accept-encoding: ['gzip, deflate'] - method: !!python/unicode DELETE - uri: http://localhost:9001/3.0/lists/open_list@example.com + method: !!python/unicode GET + uri: http://localhost:9001/3.0/domains response: - body: {string: !!python/unicode ''} + body: {string: !!python/unicode '{"entries": [{"base_url": "http://example.com", + "description": null, "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", + "mail_host": "example.com", "self_link": "http://localhost:9001/3.0/domains/example.com", + "url_host": "example.com"}], "http_etag": "\"c385b155f8da284bf78dbe075e20f58a30c893ab\"", + "start": 0, "total_size": 1}'} 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/moderate_subs@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/users/38 - response: - body: {string: !!python/unicode ''} - headers: - content-length: ['0'] - status: {code: 204, message: No Content} + content-length: ['338'] + content-type: [application/json; charset=utf-8] + status: {code: 200, message: OK} - request: body: null headers: @@ -554,4 +537,32 @@ 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 + response: + body: {string: !!python/unicode '{"entries": [{"created_on": "2005-08-01T07:49:23", + "http_etag": "\"721554143804444b7566bedff05c98352bbe43a1\"", "is_server_owner": + false, "password": "$6$rounds=597357$KK4dxc9s3RQkNOjg$.p79951iXVUX5vONPrwFQjS8gk4EA8Msv16TsiiQJlKmyYBHJWlxdTEKEBnYqxQ.fEg9wqyfRHz.a0v4YLwY91", + "self_link": "http://localhost:9001/3.0/users/122", "user_id": 122}], "http_etag": + "\"e8f4c4c6e4a45894cfdcfc603b26cd76fd5c91b3\"", "start": 0, "total_size": + 1}'} + headers: + content-length: ['433'] + 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/122 + response: + body: {string: !!python/unicode ''} + headers: + content-length: ['0'] + status: {code: 204, message: No Content} version: 1 diff --git a/src/postorius/tests/fixtures/vcr_cassettes/TestSubscription.test_subscribe_mod_then_open.yaml b/src/postorius/tests/fixtures/vcr_cassettes/TestSubscription.test_subscribe_mod_then_open.yaml index 6a9e561..dcc6185 100644 --- a/src/postorius/tests/fixtures/vcr_cassettes/TestSubscription.test_subscribe_mod_then_open.yaml +++ b/src/postorius/tests/fixtures/vcr_cassettes/TestSubscription.test_subscribe_mod_then_open.yaml @@ -187,7 +187,7 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - location: ['http://localhost:9001/3.0/users/39'] + location: ['http://localhost:9001/3.0/users/123'] status: {code: 201, message: Created} - request: body: email=fritz%40example.org @@ -195,7 +195,7 @@ accept-encoding: ['gzip, deflate'] !!python/unicode content-type: [!!python/unicode application/x-www-form-urlencoded] method: !!python/unicode POST - uri: http://localhost:9001/3.0/users/39/addresses + uri: http://localhost:9001/3.0/users/123/addresses response: body: {string: !!python/unicode ''} headers: @@ -221,11 +221,11 @@ uri: http://localhost:9001/3.0/users/test@example.com response: body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag": - "\"d5eeb9c2a9b9bd060b4766c5b549fdc5fa19abe9\"", "is_server_owner": false, - "password": "$6$rounds=693603$X6zNTcKBHAea0aQS$Hx0a6EYZkraD7RFLfr7mv2.m2yZ1M.sAQbyLVBHw85uUgfbdwF4Ih3e7CbNG5M/cQVTDrhY3pCaXNZhnrxlSj1", - "self_link": "http://localhost:9001/3.0/users/39", "user_id": 39}'} + "\"8da9e8f59c2948581b12ea4ba0ee543b658648c0\"", "is_server_owner": false, + "password": "$6$rounds=668131$vf0oDBliUcngck5R$/P51i1FWKsNmeow6Lk2Z/.tMCo75Uvk9lIoA3hPBzDGH3VNiMJAs9BhBvKm1XXpfoBPLHrxsiU9wh3YesIexo1", + "self_link": "http://localhost:9001/3.0/users/123", "user_id": 123}'} headers: - content-length: ['326'] + content-length: ['328'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -233,19 +233,19 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode GET - uri: http://localhost:9001/3.0/users/39/addresses + uri: http://localhost:9001/3.0/users/123/addresses response: body: {string: !!python/unicode '{"entries": [{"email": "fritz@example.org", "http_etag": - "\"b83404249db7d4ea3134fc9479681cb8a1b7919a\"", "original_email": "fritz@example.org", + "\"82b97451cbcc7a5a00d1cc94fa2467cab976822c\"", "original_email": "fritz@example.org", "registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/fritz@example.org", - "user": "http://localhost:9001/3.0/users/39", "verified_on": "2005-08-01T07:49:23"}, - {"email": "test@example.com", "http_etag": "\"3f59bc56ac53ac889ba2218b66f731489cd6e010\"", + "user": "http://localhost:9001/3.0/users/123", "verified_on": "2005-08-01T07:49:23"}, + {"email": "test@example.com", "http_etag": "\"abd9d1d4a62167415964ec11e1d74c3d193aadbe\"", "original_email": "test@example.com", "registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/test@example.com", "user": - "http://localhost:9001/3.0/users/39"}], "http_etag": "\"6c1699ec38040137f8327bbf2632585a7b7e4ccc\"", + "http://localhost:9001/3.0/users/123"}], "http_etag": "\"b16177aab4d9861ad5ad48b1ee76d2157b01722d\"", "start": 0, "total_size": 2}'} headers: - content-length: ['714'] + content-length: ['716'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -423,7 +423,7 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - location: ['http://localhost:9001/3.0/members/103'] + location: ['http://localhost:9001/3.0/members/107'] status: {code: 201, message: Created} - request: body: list_id=moderate_subs.example.com&role=owner&subscriber=owner%40example.com @@ -436,7 +436,7 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - location: ['http://localhost:9001/3.0/members/104'] + location: ['http://localhost:9001/3.0/members/108'] status: {code: 201, message: Created} - request: body: null @@ -462,10 +462,10 @@ uri: http://localhost:9001/3.0/users/owner@example.com response: body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag": - "\"4e1a95736360f3a01f989768ff1a28a3f7b961e0\"", "is_server_owner": false, - "self_link": "http://localhost:9001/3.0/users/29", "user_id": 29}'} + "\"39ea9156496f2970f184967c90e2312324b8ce44\"", "is_server_owner": false, + "self_link": "http://localhost:9001/3.0/users/124", "user_id": 124}'} headers: - content-length: ['190'] + content-length: ['192'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -473,15 +473,15 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode GET - uri: http://localhost:9001/3.0/users/29/addresses + uri: http://localhost:9001/3.0/users/124/addresses response: body: {string: !!python/unicode '{"entries": [{"email": "owner@example.com", "http_etag": - "\"3ff612271f0a78e0f15e86f1e93354528566ee9b\"", "original_email": "owner@example.com", + "\"5ce4ab5537b937cfe2a473be997b7c5741e00687\"", "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/29"}], "http_etag": "\"f103ec7682ec6c9bb1c12931e8253ffdb7b992b2\"", + "user": "http://localhost:9001/3.0/users/124"}], "http_etag": "\"e61ee3265484b12d7b0917ffa76428892edc3903\"", "start": 0, "total_size": 1}'} headers: - content-length: ['391'] + content-length: ['392'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -508,13 +508,13 @@ uri: http://localhost:9001/3.0/lists/moderate_subs.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": "\"25e6c1088f0d44d7c05d28bd29ac632ead710c28\"", - "list_id": "moderate_subs.example.com", "member_id": 104, "moderation_action": - "accept", "role": "owner", "self_link": "http://localhost:9001/3.0/members/104", - "user": "http://localhost:9001/3.0/users/29"}], "http_etag": "\"5582f62123579c81ac84f442a505447bfc56bf51\"", + "delivery_mode": "regular", "email": "owner@example.com", "http_etag": "\"e86417154b9915a25e3427bce87e53edd7ceff53\"", + "list_id": "moderate_subs.example.com", "member_id": 108, "moderation_action": + "accept", "role": "owner", "self_link": "http://localhost:9001/3.0/members/108", + "user": "http://localhost:9001/3.0/users/124"}], "http_etag": "\"7511e6fbd32d21c774c5bf402b542b19b7b8d25a\"", "start": 0, "total_size": 1}'} headers: - content-length: ['498'] + content-length: ['499'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -567,10 +567,10 @@ uri: http://localhost:9001/3.0/users/owner@example.com response: body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag": - "\"4e1a95736360f3a01f989768ff1a28a3f7b961e0\"", "is_server_owner": false, - "self_link": "http://localhost:9001/3.0/users/29", "user_id": 29}'} + "\"39ea9156496f2970f184967c90e2312324b8ce44\"", "is_server_owner": false, + "self_link": "http://localhost:9001/3.0/users/124", "user_id": 124}'} headers: - content-length: ['190'] + content-length: ['192'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -578,15 +578,15 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode GET - uri: http://localhost:9001/3.0/users/29/addresses + uri: http://localhost:9001/3.0/users/124/addresses response: body: {string: !!python/unicode '{"entries": [{"email": "owner@example.com", "http_etag": - "\"3ff612271f0a78e0f15e86f1e93354528566ee9b\"", "original_email": "owner@example.com", + "\"5ce4ab5537b937cfe2a473be997b7c5741e00687\"", "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/29"}], "http_etag": "\"f103ec7682ec6c9bb1c12931e8253ffdb7b992b2\"", + "user": "http://localhost:9001/3.0/users/124"}], "http_etag": "\"e61ee3265484b12d7b0917ffa76428892edc3903\"", "start": 0, "total_size": 1}'} headers: - content-length: ['391'] + content-length: ['392'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -613,13 +613,13 @@ uri: http://localhost:9001/3.0/lists/moderate_subs.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": "\"25e6c1088f0d44d7c05d28bd29ac632ead710c28\"", - "list_id": "moderate_subs.example.com", "member_id": 104, "moderation_action": - "accept", "role": "owner", "self_link": "http://localhost:9001/3.0/members/104", - "user": "http://localhost:9001/3.0/users/29"}], "http_etag": "\"5582f62123579c81ac84f442a505447bfc56bf51\"", + "delivery_mode": "regular", "email": "owner@example.com", "http_etag": "\"e86417154b9915a25e3427bce87e53edd7ceff53\"", + "list_id": "moderate_subs.example.com", "member_id": 108, "moderation_action": + "accept", "role": "owner", "self_link": "http://localhost:9001/3.0/members/108", + "user": "http://localhost:9001/3.0/users/124"}], "http_etag": "\"7511e6fbd32d21c774c5bf402b542b19b7b8d25a\"", "start": 0, "total_size": 1}'} headers: - content-length: ['498'] + content-length: ['499'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -694,35 +694,18 @@ body: null headers: accept-encoding: ['gzip, deflate'] - method: !!python/unicode DELETE - uri: http://localhost:9001/3.0/lists/open_list@example.com + method: !!python/unicode GET + uri: http://localhost:9001/3.0/domains response: - body: {string: !!python/unicode ''} + body: {string: !!python/unicode '{"entries": [{"base_url": "http://example.com", + "description": null, "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", + "mail_host": "example.com", "self_link": "http://localhost:9001/3.0/domains/example.com", + "url_host": "example.com"}], "http_etag": "\"c385b155f8da284bf78dbe075e20f58a30c893ab\"", + "start": 0, "total_size": 1}'} 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/moderate_subs@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/users/39 - response: - body: {string: !!python/unicode ''} - headers: - content-length: ['0'] - status: {code: 204, message: No Content} + content-length: ['338'] + content-type: [application/json; charset=utf-8] + status: {code: 200, message: OK} - request: body: null headers: @@ -734,4 +717,45 @@ 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 + response: + body: {string: !!python/unicode '{"entries": [{"created_on": "2005-08-01T07:49:23", + "http_etag": "\"8da9e8f59c2948581b12ea4ba0ee543b658648c0\"", "is_server_owner": + false, "password": "$6$rounds=668131$vf0oDBliUcngck5R$/P51i1FWKsNmeow6Lk2Z/.tMCo75Uvk9lIoA3hPBzDGH3VNiMJAs9BhBvKm1XXpfoBPLHrxsiU9wh3YesIexo1", + "self_link": "http://localhost:9001/3.0/users/123", "user_id": 123}, {"created_on": + "2005-08-01T07:49:23", "http_etag": "\"39ea9156496f2970f184967c90e2312324b8ce44\"", + "is_server_owner": false, "self_link": "http://localhost:9001/3.0/users/124", + "user_id": 124}], "http_etag": "\"fc4eb3524d0bdf5d6898fba757c0ca761ebf56bd\"", + "start": 0, "total_size": 2}'} + headers: + content-length: ['627'] + 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/123 + 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/124 + response: + body: {string: !!python/unicode ''} + headers: + content-length: ['0'] + status: {code: 204, message: No Content} version: 1 diff --git a/src/postorius/tests/fixtures/vcr_cassettes/TestSubscription.test_subscribe_open.yaml b/src/postorius/tests/fixtures/vcr_cassettes/TestSubscription.test_subscribe_open.yaml index 43cbbf5..684b900 100644 --- a/src/postorius/tests/fixtures/vcr_cassettes/TestSubscription.test_subscribe_open.yaml +++ b/src/postorius/tests/fixtures/vcr_cassettes/TestSubscription.test_subscribe_open.yaml @@ -187,7 +187,7 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - location: ['http://localhost:9001/3.0/users/40'] + location: ['http://localhost:9001/3.0/users/125'] status: {code: 201, message: Created} - request: body: email=fritz%40example.org @@ -195,7 +195,7 @@ accept-encoding: ['gzip, deflate'] !!python/unicode content-type: [!!python/unicode application/x-www-form-urlencoded] method: !!python/unicode POST - uri: http://localhost:9001/3.0/users/40/addresses + uri: http://localhost:9001/3.0/users/125/addresses response: body: {string: !!python/unicode ''} headers: @@ -221,11 +221,11 @@ uri: http://localhost:9001/3.0/users/test@example.com response: body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag": - "\"33f7fa81ff978ef915251d54f5ff842b1ee9d946\"", "is_server_owner": false, - "password": "$6$rounds=667790$XWFN/TYfCq8Ezqjp$sHQCfJ6swEdffGC03zt1P7lVvStxzdJXqGTx5G7NM4g5Ovzce67X7ztfCmRNLBk7/vuQDbjG9Tq1Cl2GSgKMM.", - "self_link": "http://localhost:9001/3.0/users/40", "user_id": 40}'} + "\"c97d4da0dcfb43b971214ec88a40e2129d66f4f4\"", "is_server_owner": false, + "password": "$6$rounds=591582$MInVFgQQNdvlLnqH$GplQeJY/lzk2HGKugWlEw0jiwRVBRYDCD1J46h.8CmgZouADA2oltJ.MHOda/.35AJbIFLBKwB80sTEf72EuI1", + "self_link": "http://localhost:9001/3.0/users/125", "user_id": 125}'} headers: - content-length: ['326'] + content-length: ['328'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -233,19 +233,19 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode GET - uri: http://localhost:9001/3.0/users/40/addresses + uri: http://localhost:9001/3.0/users/125/addresses response: body: {string: !!python/unicode '{"entries": [{"email": "fritz@example.org", "http_etag": - "\"a4066256fe322d66beb287a4afe122bdaece8ffe\"", "original_email": "fritz@example.org", + "\"e891e0d247c77548e45c3db9666a9a43f2f346e4\"", "original_email": "fritz@example.org", "registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/fritz@example.org", - "user": "http://localhost:9001/3.0/users/40", "verified_on": "2005-08-01T07:49:23"}, - {"email": "test@example.com", "http_etag": "\"ed370cf51a7ed5a828a3c574660bfb19ff01ab8d\"", + "user": "http://localhost:9001/3.0/users/125", "verified_on": "2005-08-01T07:49:23"}, + {"email": "test@example.com", "http_etag": "\"1f1a1f279ff2a2d4675f2d762fb101fc83cfb2ce\"", "original_email": "test@example.com", "registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/test@example.com", "user": - "http://localhost:9001/3.0/users/40"}], "http_etag": "\"005ac52abdc2fa6fa6916cb276f48ea49bc4f1d7\"", + "http://localhost:9001/3.0/users/125"}], "http_etag": "\"2c690906100d7a87eb75b63ee622f1cea7ee9b8d\"", "start": 0, "total_size": 2}'} headers: - content-length: ['714'] + content-length: ['716'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -301,7 +301,7 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - location: ['http://localhost:9001/3.0/members/105'] + location: ['http://localhost:9001/3.0/members/109'] status: {code: 201, message: Created} - request: body: null @@ -311,13 +311,13 @@ uri: http://localhost:9001/3.0/lists/open_list@example.com/roster/member response: body: {string: !!python/unicode '{"entries": [{"address": "http://localhost:9001/3.0/addresses/test@example.com", - "delivery_mode": "regular", "email": "test@example.com", "http_etag": "\"3106af0f0b39761f903b956e7c9df6a3dfcb7337\"", - "list_id": "open_list.example.com", "member_id": 105, "moderation_action": - "defer", "role": "member", "self_link": "http://localhost:9001/3.0/members/105", - "user": "http://localhost:9001/3.0/users/40"}], "http_etag": "\"5a095534341a6c157fb5257ab97beac291008045\"", - "start": 0, "total_size": 1}'} + "delivery_mode": "regular", "email": "test@example.com", "http_etag": "\"0fe2527095cc7cf37ead08b235f0de6ab057961a\"", + "list_id": "open_list.example.com", "member_id": 109, "role": "member", "self_link": + "http://localhost:9001/3.0/members/109", "user": "http://localhost:9001/3.0/users/125"}], + "http_etag": "\"c5dfeb102bbcda62808c504feeaa23f6fc2ad30c\"", "start": 0, "total_size": + 1}'} headers: - content-length: ['492'] + content-length: ['463'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -341,11 +341,11 @@ uri: http://localhost:9001/3.0/users/test@example.com response: body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag": - "\"33f7fa81ff978ef915251d54f5ff842b1ee9d946\"", "is_server_owner": false, - "password": "$6$rounds=667790$XWFN/TYfCq8Ezqjp$sHQCfJ6swEdffGC03zt1P7lVvStxzdJXqGTx5G7NM4g5Ovzce67X7ztfCmRNLBk7/vuQDbjG9Tq1Cl2GSgKMM.", - "self_link": "http://localhost:9001/3.0/users/40", "user_id": 40}'} + "\"c97d4da0dcfb43b971214ec88a40e2129d66f4f4\"", "is_server_owner": false, + "password": "$6$rounds=591582$MInVFgQQNdvlLnqH$GplQeJY/lzk2HGKugWlEw0jiwRVBRYDCD1J46h.8CmgZouADA2oltJ.MHOda/.35AJbIFLBKwB80sTEf72EuI1", + "self_link": "http://localhost:9001/3.0/users/125", "user_id": 125}'} headers: - content-length: ['326'] + content-length: ['328'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -353,20 +353,20 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode GET - uri: http://localhost:9001/3.0/users/40/addresses + uri: http://localhost:9001/3.0/users/125/addresses response: body: {string: !!python/unicode '{"entries": [{"email": "fritz@example.org", "http_etag": - "\"a4066256fe322d66beb287a4afe122bdaece8ffe\"", "original_email": "fritz@example.org", + "\"e891e0d247c77548e45c3db9666a9a43f2f346e4\"", "original_email": "fritz@example.org", "registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/fritz@example.org", - "user": "http://localhost:9001/3.0/users/40", "verified_on": "2005-08-01T07:49:23"}, - {"email": "test@example.com", "http_etag": "\"cb798742c9bf64276173e164e05763a28c4e9da0\"", + "user": "http://localhost:9001/3.0/users/125", "verified_on": "2005-08-01T07:49:23"}, + {"email": "test@example.com", "http_etag": "\"27865d8015dd04a54b201fc44858f0ff9e888f58\"", "original_email": "test@example.com", "registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/test@example.com", "user": - "http://localhost:9001/3.0/users/40", "verified_on": "2005-08-01T07:49:23"}], - "http_etag": "\"cb0598da1307a4ea97d7264daf5ddf5ba40ccba2\"", "start": 0, "total_size": + "http://localhost:9001/3.0/users/125", "verified_on": "2005-08-01T07:49:23"}], + "http_etag": "\"4a9255833867c4bca1696cd1b5e3389c342af562\"", "start": 0, "total_size": 2}'} headers: - content-length: ['752'] + content-length: ['754'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -419,12 +419,11 @@ uri: http://localhost:9001/3.0/lists/open_list.example.com/member/test@example.com response: body: {string: !!python/unicode '{"address": "http://localhost:9001/3.0/addresses/test@example.com", - "delivery_mode": "regular", "email": "test@example.com", "http_etag": "\"3106af0f0b39761f903b956e7c9df6a3dfcb7337\"", - "list_id": "open_list.example.com", "member_id": 105, "moderation_action": - "defer", "role": "member", "self_link": "http://localhost:9001/3.0/members/105", - "user": "http://localhost:9001/3.0/users/40"}'} + "delivery_mode": "regular", "email": "test@example.com", "http_etag": "\"0fe2527095cc7cf37ead08b235f0de6ab057961a\"", + "list_id": "open_list.example.com", "member_id": 109, "role": "member", "self_link": + "http://localhost:9001/3.0/members/109", "user": "http://localhost:9001/3.0/users/125"}'} headers: - content-length: ['387'] + content-length: ['358'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -490,35 +489,18 @@ body: null headers: accept-encoding: ['gzip, deflate'] - method: !!python/unicode DELETE - uri: http://localhost:9001/3.0/lists/open_list@example.com + method: !!python/unicode GET + uri: http://localhost:9001/3.0/domains response: - body: {string: !!python/unicode ''} + body: {string: !!python/unicode '{"entries": [{"base_url": "http://example.com", + "description": null, "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", + "mail_host": "example.com", "self_link": "http://localhost:9001/3.0/domains/example.com", + "url_host": "example.com"}], "http_etag": "\"c385b155f8da284bf78dbe075e20f58a30c893ab\"", + "start": 0, "total_size": 1}'} 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/moderate_subs@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/users/40 - response: - body: {string: !!python/unicode ''} - headers: - content-length: ['0'] - status: {code: 204, message: No Content} + content-length: ['338'] + content-type: [application/json; charset=utf-8] + status: {code: 200, message: OK} - request: body: null headers: @@ -530,4 +512,32 @@ 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 + response: + body: {string: !!python/unicode '{"entries": [{"created_on": "2005-08-01T07:49:23", + "http_etag": "\"c97d4da0dcfb43b971214ec88a40e2129d66f4f4\"", "is_server_owner": + false, "password": "$6$rounds=591582$MInVFgQQNdvlLnqH$GplQeJY/lzk2HGKugWlEw0jiwRVBRYDCD1J46h.8CmgZouADA2oltJ.MHOda/.35AJbIFLBKwB80sTEf72EuI1", + "self_link": "http://localhost:9001/3.0/users/125", "user_id": 125}], "http_etag": + "\"df761dec39c11b15dd2868b1e7934ced864cf11d\"", "start": 0, "total_size": + 1}'} + headers: + content-length: ['433'] + 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/125 + response: + body: {string: !!python/unicode ''} + headers: + content-length: ['0'] + status: {code: 204, message: No Content} version: 1 diff --git a/src/postorius/tests/fixtures/vcr_cassettes/TestSubscription.test_unknown_address.yaml b/src/postorius/tests/fixtures/vcr_cassettes/TestSubscription.test_unknown_address.yaml index f3e3406..daa28a8 100644 --- a/src/postorius/tests/fixtures/vcr_cassettes/TestSubscription.test_unknown_address.yaml +++ b/src/postorius/tests/fixtures/vcr_cassettes/TestSubscription.test_unknown_address.yaml @@ -187,7 +187,7 @@ body: {string: !!python/unicode ''} headers: content-length: ['0'] - location: ['http://localhost:9001/3.0/users/41'] + location: ['http://localhost:9001/3.0/users/126'] status: {code: 201, message: Created} - request: body: email=fritz%40example.org @@ -195,7 +195,7 @@ accept-encoding: ['gzip, deflate'] !!python/unicode content-type: [!!python/unicode application/x-www-form-urlencoded] method: !!python/unicode POST - uri: http://localhost:9001/3.0/users/41/addresses + uri: http://localhost:9001/3.0/users/126/addresses response: body: {string: !!python/unicode ''} headers: @@ -221,11 +221,11 @@ uri: http://localhost:9001/3.0/users/test@example.com response: body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag": - "\"d7d8c168126f4615728d09574565ccb088bd9585\"", "is_server_owner": false, - "password": "$6$rounds=595659$G/Nc0QdUY6mRrSpM$RQeqlJNKbNZje7lWkKAeo/K5jxqAP53kCdFL3/RLPDD4Artzg6TAvULiRgvbo2UUfNRz8R6.3NxHp8UaisKJ..", - "self_link": "http://localhost:9001/3.0/users/41", "user_id": 41}'} + "\"50d1c6dff26fd89a3b9e00473a7381ff8c0d8869\"", "is_server_owner": false, + "password": "$6$rounds=708393$8VdXEgXr4664.8rF$WeEemk4eBOHjtLvGI4R4gwBJu2rHPdPxIsIlr07B2H4eZd6YqXqtuvlRfCX6EitBdnHl/O4KpYN1rmHIksgRw0", + "self_link": "http://localhost:9001/3.0/users/126", "user_id": 126}'} headers: - content-length: ['326'] + content-length: ['328'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -233,19 +233,19 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode GET - uri: http://localhost:9001/3.0/users/41/addresses + uri: http://localhost:9001/3.0/users/126/addresses response: body: {string: !!python/unicode '{"entries": [{"email": "fritz@example.org", "http_etag": - "\"8331fa25dce94aaa323864dce5938641ce31134f\"", "original_email": "fritz@example.org", + "\"78f0ec153a3a6e18e8b876a94226669b541e804b\"", "original_email": "fritz@example.org", "registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/fritz@example.org", - "user": "http://localhost:9001/3.0/users/41", "verified_on": "2005-08-01T07:49:23"}, - {"email": "test@example.com", "http_etag": "\"1186dbdbf5b5336adf426e8956ef25a4360a1ce7\"", + "user": "http://localhost:9001/3.0/users/126", "verified_on": "2005-08-01T07:49:23"}, + {"email": "test@example.com", "http_etag": "\"3cece11446d4f4c665933c78a37a1571f853eeb3\"", "original_email": "test@example.com", "registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/test@example.com", "user": - "http://localhost:9001/3.0/users/41"}], "http_etag": "\"289b9c4b0587d73ea30665f4936ab5e4e7cdee65\"", + "http://localhost:9001/3.0/users/126"}], "http_etag": "\"3e2f85206afd5711c9c7ae58992736ee4522fe7f\"", "start": 0, "total_size": 2}'} headers: - content-length: ['714'] + content-length: ['716'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -324,11 +324,11 @@ uri: http://localhost:9001/3.0/users/test@example.com response: body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag": - "\"d7d8c168126f4615728d09574565ccb088bd9585\"", "is_server_owner": false, - "password": "$6$rounds=595659$G/Nc0QdUY6mRrSpM$RQeqlJNKbNZje7lWkKAeo/K5jxqAP53kCdFL3/RLPDD4Artzg6TAvULiRgvbo2UUfNRz8R6.3NxHp8UaisKJ..", - "self_link": "http://localhost:9001/3.0/users/41", "user_id": 41}'} + "\"50d1c6dff26fd89a3b9e00473a7381ff8c0d8869\"", "is_server_owner": false, + "password": "$6$rounds=708393$8VdXEgXr4664.8rF$WeEemk4eBOHjtLvGI4R4gwBJu2rHPdPxIsIlr07B2H4eZd6YqXqtuvlRfCX6EitBdnHl/O4KpYN1rmHIksgRw0", + "self_link": "http://localhost:9001/3.0/users/126", "user_id": 126}'} headers: - content-length: ['326'] + content-length: ['328'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -336,19 +336,19 @@ headers: accept-encoding: ['gzip, deflate'] method: !!python/unicode GET - uri: http://localhost:9001/3.0/users/41/addresses + uri: http://localhost:9001/3.0/users/126/addresses response: body: {string: !!python/unicode '{"entries": [{"email": "fritz@example.org", "http_etag": - "\"8331fa25dce94aaa323864dce5938641ce31134f\"", "original_email": "fritz@example.org", + "\"78f0ec153a3a6e18e8b876a94226669b541e804b\"", "original_email": "fritz@example.org", "registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/fritz@example.org", - "user": "http://localhost:9001/3.0/users/41", "verified_on": "2005-08-01T07:49:23"}, - {"email": "test@example.com", "http_etag": "\"1186dbdbf5b5336adf426e8956ef25a4360a1ce7\"", + "user": "http://localhost:9001/3.0/users/126", "verified_on": "2005-08-01T07:49:23"}, + {"email": "test@example.com", "http_etag": "\"3cece11446d4f4c665933c78a37a1571f853eeb3\"", "original_email": "test@example.com", "registered_on": "2005-08-01T07:49:23", "self_link": "http://localhost:9001/3.0/addresses/test@example.com", "user": - "http://localhost:9001/3.0/users/41"}], "http_etag": "\"289b9c4b0587d73ea30665f4936ab5e4e7cdee65\"", + "http://localhost:9001/3.0/users/126"}], "http_etag": "\"3e2f85206afd5711c9c7ae58992736ee4522fe7f\"", "start": 0, "total_size": 2}'} headers: - content-length: ['714'] + content-length: ['716'] content-type: [application/json; charset=utf-8] status: {code: 200, message: OK} - request: @@ -480,35 +480,18 @@ body: null headers: accept-encoding: ['gzip, deflate'] - method: !!python/unicode DELETE - uri: http://localhost:9001/3.0/lists/open_list@example.com + method: !!python/unicode GET + uri: http://localhost:9001/3.0/domains response: - body: {string: !!python/unicode ''} + body: {string: !!python/unicode '{"entries": [{"base_url": "http://example.com", + "description": null, "http_etag": "\"e736411818ff1815ca83575e0958c38c5188f0a4\"", + "mail_host": "example.com", "self_link": "http://localhost:9001/3.0/domains/example.com", + "url_host": "example.com"}], "http_etag": "\"c385b155f8da284bf78dbe075e20f58a30c893ab\"", + "start": 0, "total_size": 1}'} 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/moderate_subs@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/users/41 - response: - body: {string: !!python/unicode ''} - headers: - content-length: ['0'] - status: {code: 204, message: No Content} + content-length: ['338'] + content-type: [application/json; charset=utf-8] + status: {code: 200, message: OK} - request: body: null headers: @@ -520,4 +503,32 @@ 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 + response: + body: {string: !!python/unicode '{"entries": [{"created_on": "2005-08-01T07:49:23", + "http_etag": "\"50d1c6dff26fd89a3b9e00473a7381ff8c0d8869\"", "is_server_owner": + false, "password": "$6$rounds=708393$8VdXEgXr4664.8rF$WeEemk4eBOHjtLvGI4R4gwBJu2rHPdPxIsIlr07B2H4eZd6YqXqtuvlRfCX6EitBdnHl/O4KpYN1rmHIksgRw0", + "self_link": "http://localhost:9001/3.0/users/126", "user_id": 126}], "http_etag": + "\"142ddde5bc52291fd013341356af330ed67b072f\"", "start": 0, "total_size": + 1}'} + headers: + content-length: ['433'] + 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/126 + response: + body: {string: !!python/unicode ''} + headers: + content-length: ['0'] + status: {code: 204, message: No Content} version: 1 diff --git a/src/postorius/tests/mailman_api_tests/test_address_activation.py b/src/postorius/tests/mailman_api_tests/test_address_activation.py index f276bfb..2e4ddf0 100644 --- a/src/postorius/tests/mailman_api_tests/test_address_activation.py +++ b/src/postorius/tests/mailman_api_tests/test_address_activation.py @@ -48,12 +48,6 @@ self.mm_user = self.mm_client.create_user( 'subscribed@example.org', 'password') - def tearDown(self): - self.profile.delete() - self.expired.delete() - self.user.delete() - self.mm_user.delete() - def test_valid_email_is_valid(self): form = AddressActivationForm({'email': 'very_new_email@example.org'}) self.assertTrue(form.is_valid()) @@ -92,11 +86,6 @@ # Create a test request object self.request = RequestFactory().get('/') - def tearDown(self): - self.profile.delete() - self.user.delete() - mail.outbox = [] - def test_profile_creation(self): # Profile is created and has all necessary properties. self.assertEqual(self.profile.email, u'les@example.org') @@ -170,11 +159,6 @@ email=u'les@example.org', user=self.user) self.profile.save() - def tearDown(self): - self.profile.delete() - self.user.delete() - self.mm_user.delete() - def test_add_address(self): # An activation key pointing to a valid profile adds the address # to the user. diff --git a/src/postorius/tests/mailman_api_tests/test_domain_delete.py b/src/postorius/tests/mailman_api_tests/test_domain_delete.py index bf34a73..e5b7fbe 100644 --- a/src/postorius/tests/mailman_api_tests/test_domain_delete.py +++ b/src/postorius/tests/mailman_api_tests/test_domain_delete.py @@ -47,18 +47,6 @@ self.foo_list.add_moderator('moderator@example.com') self.url = reverse('domain_delete', args=['example.com']) - def tearDown(self): - self.user.delete() - self.superuser.delete() - self.owner.delete() - self.moderator.delete() - try: - self.domain.delete() - except HTTPError as e: - # The domain was deleted by a test - if e.code != 404: - raise - def test_access_anonymous(self): # Anonymous users users can't delete domains self.assertRedirectsToLogin(self.url) diff --git a/src/postorius/tests/mailman_api_tests/test_domain_index.py b/src/postorius/tests/mailman_api_tests/test_domain_index.py index 3884cc7..14e8a91 100644 --- a/src/postorius/tests/mailman_api_tests/test_domain_index.py +++ b/src/postorius/tests/mailman_api_tests/test_domain_index.py @@ -49,14 +49,6 @@ self.foo_list.add_owner('owner@example.com') self.foo_list.add_moderator('moderator@example.com') - def tearDown(self): - self.foo_list.delete() - self.user.delete() - self.superuser.delete() - self.owner.delete() - self.moderator.delete() - self.domain.delete() - def test_domain_index_not_accessible_to_public(self): # The list index page should contain the lists response = self.client.get(reverse('domain_index')) diff --git a/src/postorius/tests/mailman_api_tests/test_domain_new.py b/src/postorius/tests/mailman_api_tests/test_domain_new.py index 5db2fca..1337c83 100644 --- a/src/postorius/tests/mailman_api_tests/test_domain_new.py +++ b/src/postorius/tests/mailman_api_tests/test_domain_new.py @@ -37,14 +37,6 @@ self.superuser = User.objects.create_superuser('su', 'su@example.com', 'pwd') - def tearDown(self): - self.user.delete() - self.superuser.delete() - try: - self.mm_client.delete_domain('example.com') - except HTTPError: - pass - def test_permission_denied(self): self.client.login(username='user', password='pwd') self.assertRedirectsToLogin(reverse('domain_new')) diff --git a/src/postorius/tests/mailman_api_tests/test_list_bans.py b/src/postorius/tests/mailman_api_tests/test_list_bans.py index 9d5bdb7..afca78a 100644 --- a/src/postorius/tests/mailman_api_tests/test_list_bans.py +++ b/src/postorius/tests/mailman_api_tests/test_list_bans.py @@ -39,12 +39,6 @@ self.client.login(username="test_superuser", password='pwd') self.url = reverse('list_bans', args=['test_list.example.com']) - def tearDown(self): - self.test_user.delete() - self.test_superuser.delete() - self.m_list.delete() - self.domain.delete() - def test_login_redirect_for_anonymous(self): self.client.logout() response = self.client.get(self.url) diff --git a/src/postorius/tests/mailman_api_tests/test_list_header_matches.py b/src/postorius/tests/mailman_api_tests/test_list_header_matches.py index bb6e542..dc708d1 100644 --- a/src/postorius/tests/mailman_api_tests/test_list_header_matches.py +++ b/src/postorius/tests/mailman_api_tests/test_list_header_matches.py @@ -45,14 +45,6 @@ self.mlist.add_owner('owner@example.com') self.mlist.add_moderator('moderator@example.com') - def tearDown(self): - self.user.delete() - self.superuser.delete() - self.owner.delete() - self.moderator.delete() - self.mlist.delete() - self.domain.delete() - def test_page_not_accessible_if_not_logged_in(self): url = reverse('list_header_matches', args=['list.example.com']) self.assertRedirectsToLogin(url) diff --git a/src/postorius/tests/mailman_api_tests/test_list_index.py b/src/postorius/tests/mailman_api_tests/test_list_index.py index 90de59b..96a3f3e 100644 --- a/src/postorius/tests/mailman_api_tests/test_list_index.py +++ b/src/postorius/tests/mailman_api_tests/test_list_index.py @@ -31,11 +31,6 @@ self.foo_list = self.domain.create_list('foo') self.bar_list = self.domain.create_list('bar') - def tearDown(self): - for mlist in self.mm_client.lists: - mlist.delete() - self.domain.delete() - def test_list_index_contains_the_lists(self): # The list index page should contain the lists response = self.client.get(reverse('list_index')) diff --git a/src/postorius/tests/mailman_api_tests/test_list_members.py b/src/postorius/tests/mailman_api_tests/test_list_members.py index 615b89e..2c3dc74 100644 --- a/src/postorius/tests/mailman_api_tests/test_list_members.py +++ b/src/postorius/tests/mailman_api_tests/test_list_members.py @@ -44,14 +44,6 @@ self.foo_list.add_owner('owner@example.com') self.foo_list.add_moderator('moderator@example.com') - def tearDown(self): - self.foo_list.delete() - self.user.delete() - self.superuser.delete() - self.owner.delete() - self.moderator.delete() - self.domain.delete() - def test_page_not_accessible_if_not_logged_in(self): url = reverse('list_members', args=('foo@example.com', 'subscriber',)) self.assertRedirectsToLogin(url) diff --git a/src/postorius/tests/mailman_api_tests/test_list_new.py b/src/postorius/tests/mailman_api_tests/test_list_new.py index 2ba1073..cb3bae5 100644 --- a/src/postorius/tests/mailman_api_tests/test_list_new.py +++ b/src/postorius/tests/mailman_api_tests/test_list_new.py @@ -33,13 +33,6 @@ 'pwd') self.domain = self.mm_client.create_domain('example.com') - def tearDown(self): - self.user.delete() - self.superuser.delete() - for mlist in self.mm_client.lists: - mlist.delete() - self.domain.delete() - def test_permission_denied(self): self.client.login(username='user', password='pwd') self.assertRedirectsToLogin(reverse('list_new')) diff --git a/src/postorius/tests/mailman_api_tests/test_list_settings.py b/src/postorius/tests/mailman_api_tests/test_list_settings.py index b0c145f..04ff952 100644 --- a/src/postorius/tests/mailman_api_tests/test_list_settings.py +++ b/src/postorius/tests/mailman_api_tests/test_list_settings.py @@ -47,14 +47,6 @@ self.foo_list.add_owner('owner@example.com') self.foo_list.add_moderator('moderator@example.com') - def tearDown(self): - self.foo_list.delete() - self.user.delete() - self.superuser.delete() - self.owner.delete() - self.moderator.delete() - self.domain.delete() - def test_page_not_accessible_if_not_logged_in(self): for section_name in SETTINGS_FORMS: url = reverse('list_settings', args=('foo.example.com', diff --git a/src/postorius/tests/mailman_api_tests/test_list_summary.py b/src/postorius/tests/mailman_api_tests/test_list_summary.py index e993ec2..c5edeb8 100644 --- a/src/postorius/tests/mailman_api_tests/test_list_summary.py +++ b/src/postorius/tests/mailman_api_tests/test_list_summary.py @@ -36,14 +36,6 @@ self.foo_list = self.domain.create_list('foo') User.objects.create_user('testuser', 'test@example.com', 'testpass') - def tearDown(self): - for mlist in self.mm_client.lists: - mlist.delete() - for user in self.mm_client.users: - user.delete() - User.objects.all().delete() - self.domain.delete() - def test_list_summary_logged_out(self): # Response must contain list obj but not the form. response = self.client.get(reverse('list_summary', diff --git a/src/postorius/tests/mailman_api_tests/test_models.py b/src/postorius/tests/mailman_api_tests/test_models.py index f9dd260..0dfad43 100644 --- a/src/postorius/tests/mailman_api_tests/test_models.py +++ b/src/postorius/tests/mailman_api_tests/test_models.py @@ -34,14 +34,6 @@ self.domain = self.mm_client.create_domain('example.com') self.foo_list = self.domain.create_list('foo') - def tearDown(self): - for mlist in self.mm_client.lists: - mlist.delete() - for user in self.mm_client.users: - user.delete() - User.objects.all().delete() - self.domain.delete() - def test_mailman_user_not_created_when_flag_is_off(self): with self.settings(AUTOCREATE_MAILMAN_USER=False): User.objects.create_user('testuser', 'test@example.com', diff --git a/src/postorius/tests/mailman_api_tests/test_profile.py b/src/postorius/tests/mailman_api_tests/test_profile.py index 2f8ff3c..a36ec23 100644 --- a/src/postorius/tests/mailman_api_tests/test_profile.py +++ b/src/postorius/tests/mailman_api_tests/test_profile.py @@ -42,11 +42,6 @@ self.client.post(reverse('user_login'), {'username': 'les', 'password': 'secret'}) - def tearDown(self): - # Log out and delete user. - self.client.logout() - self.user.delete() - def test_view_contains_form(self): # The view context should contain a form. response = self.client.get(reverse('user_profile')) diff --git a/src/postorius/tests/mailman_api_tests/test_subscriptions.py b/src/postorius/tests/mailman_api_tests/test_subscriptions.py index 2f226ed..df47e8a 100644 --- a/src/postorius/tests/mailman_api_tests/test_subscriptions.py +++ b/src/postorius/tests/mailman_api_tests/test_subscriptions.py @@ -47,16 +47,12 @@ self.mm_user.add_address('fritz@example.org').verify() def tearDown(self): - # Delete all subscription requests + # XXX remove the method if core cleares requests on list deletion for req in self.open_list.requests: self.open_list.moderate_request(req['token'], 'discard') for req in self.mod_list.requests: self.mod_list.moderate_request(req['token'], 'discard') - self.open_list.delete() - self.mod_list.delete() - self.mm_user.delete() - self.domain.delete() - User.objects.all().delete() + super(TestSubscription, self).tearDown() def test_subscribe_open(self): # The subscription goes straight through. diff --git a/src/postorius/tests/mailman_api_tests/test_user.py b/src/postorius/tests/mailman_api_tests/test_user.py index adda5d9..81566c6 100644 --- a/src/postorius/tests/mailman_api_tests/test_user.py +++ b/src/postorius/tests/mailman_api_tests/test_user.py @@ -39,12 +39,6 @@ 'user', 'user@example.com', 'testpass') self.mm_user = MailmanUser.objects.create_from_django(self.user) - def tearDown(self): - self.foo_list.delete() - self.mm_user.delete() - self.user.delete() - self.domain.delete() - def test_address_preferences_not_logged_in(self): self.assertRedirectsToLogin(reverse('user_address_preferences')) diff --git a/src/postorius/tests/utils.py b/src/postorius/tests/utils.py index 6de3dcf..850519b 100644 --- a/src/postorius/tests/utils.py +++ b/src/postorius/tests/utils.py @@ -114,6 +114,12 @@ self.cassette = cm.__enter__() self.addCleanup(cm.__exit__, None, None, None) + def tearDown(self): + for d in self.mm_client.domains: + d.delete() + for u in self.mm_client.users: + u.delete() + def assertHasSuccessMessage(self, response): msgs = get_flash_messages(response) self.assertEqual(len(msgs), 1)