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 deleted file mode 100644 index b66b3ec..0000000 --- a/src/postorius/tests/fixtures/vcr_cassettes/TestAddressActivationForm.test_email_used_by_django_auth_is_invalid.yaml +++ /dev/null @@ -1,56 +0,0 @@ -interactions: -- request: - body: email=subscribed%40example.org&password=password - 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/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/110 - 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_expired_confirmation_profile_is_valid.yaml b/src/postorius/tests/fixtures/vcr_cassettes/TestAddressActivationForm.test_email_used_by_expired_confirmation_profile_is_valid.yaml deleted file mode 100644 index 3039fa2..0000000 --- a/src/postorius/tests/fixtures/vcr_cassettes/TestAddressActivationForm.test_email_used_by_expired_confirmation_profile_is_valid.yaml +++ /dev/null @@ -1,68 +0,0 @@ -interactions: -- request: - body: email=subscribed%40example.org&password=password - 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/111'] - status: {code: 201, message: Created} -- request: - body: null - headers: - accept-encoding: ['gzip, deflate'] - method: !!python/unicode GET - uri: http://localhost:9001/3.0/users/expired@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: 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/111 - 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_mailman_is_invalid.yaml b/src/postorius/tests/fixtures/vcr_cassettes/TestAddressActivationForm.test_email_used_by_mailman_is_invalid.yaml deleted file mode 100644 index 1a88042..0000000 --- a/src/postorius/tests/fixtures/vcr_cassettes/TestAddressActivationForm.test_email_used_by_mailman_is_invalid.yaml +++ /dev/null @@ -1,71 +0,0 @@ -interactions: -- request: - body: email=subscribed%40example.org&password=password - 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/112'] - status: {code: 201, message: Created} -- request: - body: null - headers: - accept-encoding: ['gzip, deflate'] - method: !!python/unicode GET - uri: http://localhost:9001/3.0/users/subscribed@example.org - response: - body: {string: !!python/unicode '{"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}'} - headers: - 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: - body: null - headers: - accept-encoding: ['gzip, deflate'] - method: !!python/unicode DELETE - uri: http://localhost:9001/3.0/users/112 - 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_invalid_email_is_not_valid.yaml b/src/postorius/tests/fixtures/vcr_cassettes/TestAddressActivationForm.test_invalid_email_is_not_valid.yaml deleted file mode 100644 index eaf8727..0000000 --- a/src/postorius/tests/fixtures/vcr_cassettes/TestAddressActivationForm.test_invalid_email_is_not_valid.yaml +++ /dev/null @@ -1,56 +0,0 @@ -interactions: -- request: - body: email=subscribed%40example.org&password=password - 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/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/113 - 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_valid_email_is_valid.yaml b/src/postorius/tests/fixtures/vcr_cassettes/TestAddressActivationForm.test_valid_email_is_valid.yaml deleted file mode 100644 index fef4154..0000000 --- a/src/postorius/tests/fixtures/vcr_cassettes/TestAddressActivationForm.test_valid_email_is_valid.yaml +++ /dev/null @@ -1,68 +0,0 @@ -interactions: -- request: - body: email=subscribed%40example.org&password=password - 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/114'] - status: {code: 201, message: Created} -- request: - body: null - headers: - accept-encoding: ['gzip, deflate'] - method: !!python/unicode GET - uri: http://localhost:9001/3.0/users/very_new_email@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: 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/114 - 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/TestAddressActivationLinkSuccess.test_add_address.yaml b/src/postorius/tests/fixtures/vcr_cassettes/TestAddressActivationLinkSuccess.test_add_address.yaml deleted file mode 100644 index 676b31b..0000000 --- a/src/postorius/tests/fixtures/vcr_cassettes/TestAddressActivationLinkSuccess.test_add_address.yaml +++ /dev/null @@ -1,246 +0,0 @@ -interactions: -- request: - body: email=ler%40example.org&password=None - 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/115'] - status: {code: 201, message: Created} -- request: - body: null - headers: - accept-encoding: ['gzip, deflate'] - method: !!python/unicode GET - uri: http://localhost:9001/3.0/users/ler@example.org - response: - body: {string: !!python/unicode '{"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}'} - headers: - 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/users/115/addresses - response: - body: {string: !!python/unicode '{"entries": [{"email": "ler@example.org", "http_etag": - "\"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/115"}], "http_etag": "\"8521b58d7a778d78806c7fdc7b21f3040ba4beb1\"", - "start": 0, "total_size": 1}'} - headers: - content-length: ['386'] - 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/ler@example.org - response: - body: {string: !!python/unicode '{"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}'} - headers: - content-length: ['328'] - content-type: [application/json; charset=utf-8] - status: {code: 200, message: OK} -- 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/115/addresses - response: - body: {string: !!python/unicode ''} - headers: - content-length: ['0'] - location: ['http://localhost:9001/3.0/addresses/les@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/les@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 - uri: http://localhost:9001/3.0/users/ler@example.org - response: - body: {string: !!python/unicode '{"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}'} - headers: - 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/users/115/addresses - response: - body: {string: !!python/unicode '{"entries": [{"email": "ler@example.org", "http_etag": - "\"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/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/115", "verified_on": "2005-08-01T07:49:23"}], - "http_etag": "\"a280ed2b292b50ba2825562af33365c2074e6451\"", "start": 0, "total_size": - 2}'} - headers: - 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/users/ler@example.org - response: - body: {string: !!python/unicode '{"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}'} - headers: - 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/users/115/addresses - response: - body: {string: !!python/unicode '{"entries": [{"email": "ler@example.org", "http_etag": - "\"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/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/115", "verified_on": "2005-08-01T07:49:23"}], - "http_etag": "\"a280ed2b292b50ba2825562af33365c2074e6451\"", "start": 0, "total_size": - 2}'} - headers: - 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/users/ler@example.org - response: - body: {string: !!python/unicode '{"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}'} - headers: - 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/users/115 - response: - body: {string: !!python/unicode '{"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}'} - headers: - 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/users/115/addresses - response: - body: {string: !!python/unicode '{"entries": [{"email": "ler@example.org", "http_etag": - "\"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/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/115", "verified_on": "2005-08-01T07:49:23"}], - "http_etag": "\"a280ed2b292b50ba2825562af33365c2074e6451\"", "start": 0, "total_size": - 2}'} - headers: - 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: - body: null - headers: - accept-encoding: ['gzip, deflate'] - method: !!python/unicode DELETE - uri: http://localhost:9001/3.0/users/115 - 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/TestAddressActivationLinkSuccess.test_existing_user.yaml b/src/postorius/tests/fixtures/vcr_cassettes/TestAddressActivationLinkSuccess.test_existing_user.yaml deleted file mode 100644 index 9770489..0000000 --- a/src/postorius/tests/fixtures/vcr_cassettes/TestAddressActivationLinkSuccess.test_existing_user.yaml +++ /dev/null @@ -1,259 +0,0 @@ -interactions: -- request: - body: email=ler%40example.org&password=None - 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/36'] - status: {code: 201, message: Created} -- request: - body: email=les%40example.org&password=None - 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/37'] - status: {code: 201, message: Created} -- request: - body: null - headers: - accept-encoding: ['gzip, deflate'] - method: !!python/unicode GET - uri: http://localhost:9001/3.0/users/ler@example.org - response: - body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag": - "\"80be5db66e58bc06266ab6933e273d69ed62a895\"", "is_server_owner": false, - "password": "$6$rounds=712780$M0l.sgxEzkzCeDYD$2LFDRYejEvpjysYXJG6dq5eycN1GUr1lf/pWTiV/jGP77Nc3l2YJQXF40VSUwZf1Nti/o3sianZSyq4rIYSbd/", - "self_link": "http://localhost:9001/3.0/users/36", "user_id": 36}'} - headers: - content-length: ['326'] - 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/36/addresses - response: - body: {string: !!python/unicode '{"entries": [{"email": "ler@example.org", "http_etag": - "\"200edc8cd699f99ec37a93e5ee6001d7a94a934c\"", "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/36"}], "http_etag": "\"d4e56c1333a0709562bb8597b88e71706e5a196d\"", - "start": 0, "total_size": 1}'} - headers: - content-length: ['385'] - 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/ler@example.org - response: - body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag": - "\"80be5db66e58bc06266ab6933e273d69ed62a895\"", "is_server_owner": false, - "password": "$6$rounds=712780$M0l.sgxEzkzCeDYD$2LFDRYejEvpjysYXJG6dq5eycN1GUr1lf/pWTiV/jGP77Nc3l2YJQXF40VSUwZf1Nti/o3sianZSyq4rIYSbd/", - "self_link": "http://localhost:9001/3.0/users/36", "user_id": 36}'} - headers: - content-length: ['326'] - content-type: [application/json; charset=utf-8] - status: {code: 200, message: OK} -- request: - body: email=les%40example.org&absorb_existing=1 - 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/36/addresses - response: - body: {string: !!python/unicode ''} - headers: - content-length: ['0'] - location: ['http://localhost:9001/3.0/addresses/les@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/les@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 - uri: http://localhost:9001/3.0/users/ler@example.org - response: - body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag": - "\"80be5db66e58bc06266ab6933e273d69ed62a895\"", "is_server_owner": false, - "password": "$6$rounds=712780$M0l.sgxEzkzCeDYD$2LFDRYejEvpjysYXJG6dq5eycN1GUr1lf/pWTiV/jGP77Nc3l2YJQXF40VSUwZf1Nti/o3sianZSyq4rIYSbd/", - "self_link": "http://localhost:9001/3.0/users/36", "user_id": 36}'} - headers: - content-length: ['326'] - 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/36/addresses - response: - body: {string: !!python/unicode '{"entries": [{"email": "ler@example.org", "http_etag": - "\"200edc8cd699f99ec37a93e5ee6001d7a94a934c\"", "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/36"}, {"email": "les@example.org", - "http_etag": "\"fb740ff55957047e74c6156941ec9837f60581d1\"", "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/36", "verified_on": "2005-08-01T07:49:23"}], - "http_etag": "\"d8edcc475fdd38e064eaaa0d8aa9a461ccafca36\"", "start": 0, "total_size": - 2}'} - headers: - content-length: ['705'] - 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/ler@example.org - response: - body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag": - "\"80be5db66e58bc06266ab6933e273d69ed62a895\"", "is_server_owner": false, - "password": "$6$rounds=712780$M0l.sgxEzkzCeDYD$2LFDRYejEvpjysYXJG6dq5eycN1GUr1lf/pWTiV/jGP77Nc3l2YJQXF40VSUwZf1Nti/o3sianZSyq4rIYSbd/", - "self_link": "http://localhost:9001/3.0/users/36", "user_id": 36}'} - headers: - content-length: ['326'] - 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/36/addresses - response: - body: {string: !!python/unicode '{"entries": [{"email": "ler@example.org", "http_etag": - "\"200edc8cd699f99ec37a93e5ee6001d7a94a934c\"", "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/36"}, {"email": "les@example.org", - "http_etag": "\"fb740ff55957047e74c6156941ec9837f60581d1\"", "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/36", "verified_on": "2005-08-01T07:49:23"}], - "http_etag": "\"d8edcc475fdd38e064eaaa0d8aa9a461ccafca36\"", "start": 0, "total_size": - 2}'} - headers: - content-length: ['705'] - 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/ler@example.org - response: - body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag": - "\"80be5db66e58bc06266ab6933e273d69ed62a895\"", "is_server_owner": false, - "password": "$6$rounds=712780$M0l.sgxEzkzCeDYD$2LFDRYejEvpjysYXJG6dq5eycN1GUr1lf/pWTiV/jGP77Nc3l2YJQXF40VSUwZf1Nti/o3sianZSyq4rIYSbd/", - "self_link": "http://localhost:9001/3.0/users/36", "user_id": 36}'} - headers: - content-length: ['326'] - 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/36 - response: - body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag": - "\"80be5db66e58bc06266ab6933e273d69ed62a895\"", "is_server_owner": false, - "password": "$6$rounds=712780$M0l.sgxEzkzCeDYD$2LFDRYejEvpjysYXJG6dq5eycN1GUr1lf/pWTiV/jGP77Nc3l2YJQXF40VSUwZf1Nti/o3sianZSyq4rIYSbd/", - "self_link": "http://localhost:9001/3.0/users/36", "user_id": 36}'} - headers: - content-length: ['326'] - 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/36/addresses - response: - body: {string: !!python/unicode '{"entries": [{"email": "ler@example.org", "http_etag": - "\"200edc8cd699f99ec37a93e5ee6001d7a94a934c\"", "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/36"}, {"email": "les@example.org", - "http_etag": "\"fb740ff55957047e74c6156941ec9837f60581d1\"", "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/36", "verified_on": "2005-08-01T07:49:23"}], - "http_etag": "\"d8edcc475fdd38e064eaaa0d8aa9a461ccafca36\"", "start": 0, "total_size": - 2}'} - headers: - content-length: ['705'] - 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": "\"1c5db752cf25d65b8c5628f240cfc2a77ba33ded\"", "is_server_owner": - false, "password": "$6$rounds=698089$Gt7kUt0Gsn4ZEduV$DQBhVSJMs/yN9VMYJ6GVja11SxdW8bYDya91Xf5C9Le7ejStwuJIdc2.kYsyrJQG09OGw2fnizsKfnEs.9udA1", - "self_link": "http://localhost:9001/3.0/users/36", "user_id": 36}], "http_etag": - "\"a9de2de6a6c0e925565f35e4e5458cd60cdc9826\"", "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/36 - 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_change_display_name.yaml b/src/postorius/tests/fixtures/vcr_cassettes/TestProfile.test_change_display_name.yaml deleted file mode 100644 index 3954393..0000000 --- a/src/postorius/tests/fixtures/vcr_cassettes/TestProfile.test_change_display_name.yaml +++ /dev/null @@ -1,129 +0,0 @@ -interactions: -- 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/30'] - status: {code: 201, message: Created} -- request: - body: null - headers: - accept-encoding: ['gzip, deflate'] - 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": - "\"c00fc606394cf49ec80428acaa232d09bfe0217e\"", "is_server_owner": false, - "password": "$6$rounds=609804$czHjKJQcPm5zGXNd$WvmPL9LDx0LVxsDZGT.jBnkaua0RVxfG1nYqe.0I.Zx8w8O1revKE6V2Y3ysJtWGKMXFbc18DjfIWr/1VH.IL1", - "self_link": "http://localhost:9001/3.0/users/30", "user_id": 30}'} - headers: - content-length: ['326'] - 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/30/addresses - response: - body: {string: !!python/unicode '{"entries": [{"email": "les@example.org", "http_etag": - "\"b93a5f58b47e659a7de9b8e690adbbd7a9a37365\"", "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/30"}], "http_etag": "\"7ad219cc3e8d4c55ecfde78853d61d3e4d2057c8\"", - "start": 0, "total_size": 1}'} - headers: - content-length: ['385'] - 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/les@example.org - response: - body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag": - "\"c00fc606394cf49ec80428acaa232d09bfe0217e\"", "is_server_owner": false, - "password": "$6$rounds=609804$czHjKJQcPm5zGXNd$WvmPL9LDx0LVxsDZGT.jBnkaua0RVxfG1nYqe.0I.Zx8w8O1revKE6V2Y3ysJtWGKMXFbc18DjfIWr/1VH.IL1", - "self_link": "http://localhost:9001/3.0/users/30", "user_id": 30}'} - headers: - content-length: ['326'] - content-type: [application/json; charset=utf-8] - status: {code: 200, message: OK} -- request: - body: display_name=testname - headers: - accept-encoding: ['gzip, deflate'] - !!python/unicode content-type: [!!python/unicode application/x-www-form-urlencoded] - method: !!python/unicode PATCH - uri: http://localhost:9001/3.0/users/30 - 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/30 - response: - body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "display_name": - "testname", "http_etag": "\"c779bcf5ba77ed5c9a37967ccd2c08171ece4f12\"", "is_server_owner": - false, "password": "$6$rounds=609804$czHjKJQcPm5zGXNd$WvmPL9LDx0LVxsDZGT.jBnkaua0RVxfG1nYqe.0I.Zx8w8O1revKE6V2Y3ysJtWGKMXFbc18DjfIWr/1VH.IL1", - "self_link": "http://localhost:9001/3.0/users/30", "user_id": 30}'} - headers: - content-length: ['354'] - 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", - "display_name": "testname", "http_etag": "\"c779bcf5ba77ed5c9a37967ccd2c08171ece4f12\"", - "is_server_owner": false, "password": "$6$rounds=609804$czHjKJQcPm5zGXNd$WvmPL9LDx0LVxsDZGT.jBnkaua0RVxfG1nYqe.0I.Zx8w8O1revKE6V2Y3ysJtWGKMXFbc18DjfIWr/1VH.IL1", - "self_link": "http://localhost:9001/3.0/users/30", "user_id": 30}], "http_etag": - "\"e634e988fcb8f7e74dc2cf53588b6b882847e38b\"", "start": 0, "total_size": - 1}'} - headers: - content-length: ['459'] - 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: - content-length: ['0'] - status: {code: 204, message: No Content} -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 deleted file mode 100644 index d5044e3..0000000 --- a/src/postorius/tests/fixtures/vcr_cassettes/TestProfile.test_post_form_with_smtp_exception.yaml +++ /dev/null @@ -1,107 +0,0 @@ -interactions: -- request: - body: null - headers: - accept-encoding: ['gzip, deflate'] - 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: null - headers: - accept-encoding: ['gzip, deflate'] - 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/31'] - status: {code: 201, message: Created} -- request: - body: null - headers: - accept-encoding: ['gzip, deflate'] - method: !!python/unicode GET - uri: http://localhost:9001/3.0/users/31 - response: - body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag": - "\"8b15a48e7aab768121255eeaa51c1cd583d03bfc\"", "is_server_owner": false, - "password": "$6$rounds=674662$y/H9BwjRxwSe.L9R$zcYWTsgjx2J/7AUQRFoACDYeqBNIrsjxuz1SLKXvQrXjutVmnM5uVhU9Riub2vz/JETHwOJly9dgjTAVuUnSU0", - "self_link": "http://localhost:9001/3.0/users/31", "user_id": 31}'} - headers: - content-length: ['326'] - 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/new_address@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: 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": "\"8b15a48e7aab768121255eeaa51c1cd583d03bfc\"", "is_server_owner": - false, "password": "$6$rounds=674662$y/H9BwjRxwSe.L9R$zcYWTsgjx2J/7AUQRFoACDYeqBNIrsjxuz1SLKXvQrXjutVmnM5uVhU9Riub2vz/JETHwOJly9dgjTAVuUnSU0", - "self_link": "http://localhost:9001/3.0/users/31", "user_id": 31}], "http_etag": - "\"69af0738b7dd16acdb295ee705581069cf574dc2\"", "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/31 - 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 deleted file mode 100644 index 5541615..0000000 --- a/src/postorius/tests/fixtures/vcr_cassettes/TestProfile.test_post_invalid_form_shows_error_msg.yaml +++ /dev/null @@ -1,95 +0,0 @@ -interactions: -- request: - body: null - headers: - accept-encoding: ['gzip, deflate'] - 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: null - headers: - accept-encoding: ['gzip, deflate'] - 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/32'] - status: {code: 201, message: Created} -- request: - body: null - headers: - accept-encoding: ['gzip, deflate'] - method: !!python/unicode GET - uri: http://localhost:9001/3.0/users/32 - response: - body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag": - "\"c35ee9d7f435114a9bbd393f1997d9ad90b639d0\"", "is_server_owner": false, - "password": "$6$rounds=684549$au8U5LcyUMdQO.hH$KVF7NcArszy8kOozZ2A1W/.j/Bp7H2fgI.jOY7dmzPoD0Ltauo1xEYYplGcTYKiUHg4S5BnibZuM4qFb2j7O01", - "self_link": "http://localhost:9001/3.0/users/32", "user_id": 32}'} - headers: - content-length: ['326'] - 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": "\"c35ee9d7f435114a9bbd393f1997d9ad90b639d0\"", "is_server_owner": - false, "password": "$6$rounds=684549$au8U5LcyUMdQO.hH$KVF7NcArszy8kOozZ2A1W/.j/Bp7H2fgI.jOY7dmzPoD0Ltauo1xEYYplGcTYKiUHg4S5BnibZuM4qFb2j7O01", - "self_link": "http://localhost:9001/3.0/users/32", "user_id": 32}], "http_etag": - "\"899aca8c420cd51df18d46261f8c98622455b2dd\"", "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/32 - 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 deleted file mode 100644 index c94ae54..0000000 --- a/src/postorius/tests/fixtures/vcr_cassettes/TestProfile.test_post_valid_form_redirects_on_success.yaml +++ /dev/null @@ -1,153 +0,0 @@ -interactions: -- request: - body: null - headers: - accept-encoding: ['gzip, deflate'] - 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: null - headers: - accept-encoding: ['gzip, deflate'] - 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/33'] - status: {code: 201, message: Created} -- request: - body: null - headers: - accept-encoding: ['gzip, deflate'] - method: !!python/unicode GET - uri: http://localhost:9001/3.0/users/33 - response: - body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag": - "\"b5d85dcc5592a113aa495dea2f5243db7bf28be5\"", "is_server_owner": false, - "password": "$6$rounds=594438$yT1G.Tias7E.N2jY$uE/BBkZcOB5LOx02xsLXrS3UCpFmnKeyBlCXQZCgi1FVKMeYgZGvSIFpd3ZKA7Xu9U.79eUqvPEeSqsibuTL.1", - "self_link": "http://localhost:9001/3.0/users/33", "user_id": 33}'} - headers: - content-length: ['326'] - 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/new_address@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: null - headers: - accept-encoding: ['gzip, deflate'] - 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": - "\"b5d85dcc5592a113aa495dea2f5243db7bf28be5\"", "is_server_owner": false, - "password": "$6$rounds=594438$yT1G.Tias7E.N2jY$uE/BBkZcOB5LOx02xsLXrS3UCpFmnKeyBlCXQZCgi1FVKMeYgZGvSIFpd3ZKA7Xu9U.79eUqvPEeSqsibuTL.1", - "self_link": "http://localhost:9001/3.0/users/33", "user_id": 33}'} - headers: - content-length: ['326'] - 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/33/addresses - response: - body: {string: !!python/unicode '{"entries": [{"email": "les@example.org", "http_etag": - "\"379ec109323fbcf8c99b28f734e5e82c47913e9b\"", "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/33"}], "http_etag": "\"4c1fece179275aa8a7d45ffca3d441378da3ecd1\"", - "start": 0, "total_size": 1}'} - headers: - content-length: ['385'] - 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/les@example.org - response: - body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag": - "\"b5d85dcc5592a113aa495dea2f5243db7bf28be5\"", "is_server_owner": false, - "password": "$6$rounds=594438$yT1G.Tias7E.N2jY$uE/BBkZcOB5LOx02xsLXrS3UCpFmnKeyBlCXQZCgi1FVKMeYgZGvSIFpd3ZKA7Xu9U.79eUqvPEeSqsibuTL.1", - "self_link": "http://localhost:9001/3.0/users/33", "user_id": 33}'} - headers: - content-length: ['326'] - 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": "\"b5d85dcc5592a113aa495dea2f5243db7bf28be5\"", "is_server_owner": - false, "password": "$6$rounds=594438$yT1G.Tias7E.N2jY$uE/BBkZcOB5LOx02xsLXrS3UCpFmnKeyBlCXQZCgi1FVKMeYgZGvSIFpd3ZKA7Xu9U.79eUqvPEeSqsibuTL.1", - "self_link": "http://localhost:9001/3.0/users/33", "user_id": 33}], "http_etag": - "\"1d709ba6c10a9838e7f3583a084bb1e2e8c7acf5\"", "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/33 - 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 deleted file mode 100644 index d7d3ffb..0000000 --- a/src/postorius/tests/fixtures/vcr_cassettes/TestProfile.test_post_valid_form_shows_success_message.yaml +++ /dev/null @@ -1,153 +0,0 @@ -interactions: -- request: - body: null - headers: - accept-encoding: ['gzip, deflate'] - 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: null - headers: - accept-encoding: ['gzip, deflate'] - 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/34'] - status: {code: 201, message: Created} -- request: - body: null - headers: - accept-encoding: ['gzip, deflate'] - method: !!python/unicode GET - uri: http://localhost:9001/3.0/users/34 - response: - body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag": - "\"5cd50a95563331af2dc6b22c77423258f4025629\"", "is_server_owner": false, - "password": "$6$rounds=692048$z/XmBc5wTRIOUnMq$76ov81e/l795odjZAhtsUqJ.Q5Qqg2jPQdGcFajp7lP21MT/k1RY8pgW6KzobvDXkRsFk8grz107eqvt.Tmzk1", - "self_link": "http://localhost:9001/3.0/users/34", "user_id": 34}'} - headers: - content-length: ['326'] - 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/new_address@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: null - headers: - accept-encoding: ['gzip, deflate'] - 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": - "\"5cd50a95563331af2dc6b22c77423258f4025629\"", "is_server_owner": false, - "password": "$6$rounds=692048$z/XmBc5wTRIOUnMq$76ov81e/l795odjZAhtsUqJ.Q5Qqg2jPQdGcFajp7lP21MT/k1RY8pgW6KzobvDXkRsFk8grz107eqvt.Tmzk1", - "self_link": "http://localhost:9001/3.0/users/34", "user_id": 34}'} - headers: - content-length: ['326'] - 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/34/addresses - response: - body: {string: !!python/unicode '{"entries": [{"email": "les@example.org", "http_etag": - "\"90a74eff5a9d7a1fbb568b166642e9b630ffd155\"", "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/34"}], "http_etag": "\"f8037b34d17713bbeab087a17a536695ff6a28ab\"", - "start": 0, "total_size": 1}'} - headers: - content-length: ['385'] - 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/les@example.org - response: - body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag": - "\"5cd50a95563331af2dc6b22c77423258f4025629\"", "is_server_owner": false, - "password": "$6$rounds=692048$z/XmBc5wTRIOUnMq$76ov81e/l795odjZAhtsUqJ.Q5Qqg2jPQdGcFajp7lP21MT/k1RY8pgW6KzobvDXkRsFk8grz107eqvt.Tmzk1", - "self_link": "http://localhost:9001/3.0/users/34", "user_id": 34}'} - headers: - content-length: ['326'] - 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": "\"5cd50a95563331af2dc6b22c77423258f4025629\"", "is_server_owner": - false, "password": "$6$rounds=692048$z/XmBc5wTRIOUnMq$76ov81e/l795odjZAhtsUqJ.Q5Qqg2jPQdGcFajp7lP21MT/k1RY8pgW6KzobvDXkRsFk8grz107eqvt.Tmzk1", - "self_link": "http://localhost:9001/3.0/users/34", "user_id": 34}], "http_etag": - "\"2511e6bae67e583db88c2b187179ce7f28fa893f\"", "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/34 - 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 deleted file mode 100644 index a2e8e58..0000000 --- a/src/postorius/tests/fixtures/vcr_cassettes/TestProfile.test_view_contains_form.yaml +++ /dev/null @@ -1,95 +0,0 @@ -interactions: -- request: - body: null - headers: - accept-encoding: ['gzip, deflate'] - 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: null - headers: - accept-encoding: ['gzip, deflate'] - 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/35'] - status: {code: 201, message: Created} -- request: - body: null - headers: - accept-encoding: ['gzip, deflate'] - method: !!python/unicode GET - uri: http://localhost:9001/3.0/users/35 - response: - body: {string: !!python/unicode '{"created_on": "2005-08-01T07:49:23", "http_etag": - "\"371790a6d8bf4e0903a6da47dcacb90e72e8bdb9\"", "is_server_owner": false, - "password": "$6$rounds=634445$E/IorwYNeGyH.2hY$dKuMaRbe4KgmFGcwGaZM1xemNnHoAb3ZLH.quJmVuHKC8nfViLvpJRb.Gw7qzFRTUUjoSlcugmilge8MVjR1i1", - "self_link": "http://localhost:9001/3.0/users/35", "user_id": 35}'} - headers: - content-length: ['326'] - 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": "\"371790a6d8bf4e0903a6da47dcacb90e72e8bdb9\"", "is_server_owner": - false, "password": "$6$rounds=634445$E/IorwYNeGyH.2hY$dKuMaRbe4KgmFGcwGaZM1xemNnHoAb3ZLH.quJmVuHKC8nfViLvpJRb.Gw7qzFRTUUjoSlcugmilge8MVjR1i1", - "self_link": "http://localhost:9001/3.0/users/35", "user_id": 35}], "http_etag": - "\"89b31057a7271a605f8fb510cbef2c4d3d44a80f\"", "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/35 - 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 deleted file mode 100644 index 56a4a5f..0000000 --- a/src/postorius/tests/mailman_api_tests/test_address_activation.py +++ /dev/null @@ -1,187 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright (C) 2016 by the Free Software Foundation, Inc. -# -# This file is part of Postorius. -# -# Postorius is free software: you can redistribute it and/or modify it under -# the terms of the GNU General Public License as published by the Free -# Software Foundation, either version 3 of the License, or (at your option) -# any later version. -# Postorius is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for -# more details. -# -# You should have received a copy of the GNU General Public License along with -# Postorius. If not, see . - -from __future__ import absolute_import, print_function, unicode_literals - -from datetime import datetime, timedelta -from django.contrib.auth.models import User -from django.core.urlresolvers import reverse -from django.core import mail -from django.test.client import RequestFactory -from django.test.utils import override_settings - -from postorius.forms import AddressActivationForm -from postorius.models import AddressConfirmationProfile -from postorius.tests.utils import ViewTestCase - - -class TestAddressActivationForm(ViewTestCase): - """ - Test the activation form. - """ - - def setUp(self): - super(TestAddressActivationForm, self).setUp() - # Create a user and profile. - self.user = User.objects.create_user( - 'testuser', 'les@example.org', 'testpass') - self.profile = AddressConfirmationProfile.objects.create( - email='les2@example.org', user=self.user) - self.expired = AddressConfirmationProfile.objects.create( - email='expired@example.org', user=self.user) - self.expired.created -= timedelta(weeks=100) - self.expired.save() - self.mm_user = self.mm_client.create_user( - 'subscribed@example.org', 'password') - - def test_valid_email_is_valid(self): - form = AddressActivationForm({'email': 'very_new_email@example.org'}) - self.assertTrue(form.is_valid()) - - def test_email_used_by_django_auth_is_invalid(self): - form = AddressActivationForm({'email': 'les@example.org'}) - self.assertFalse(form.is_valid()) - - def test_invalid_email_is_not_valid(self): - form = AddressActivationForm({'email': 'les@example'}) - self.assertFalse(form.is_valid()) - - def test_email_used_by_expired_confirmation_profile_is_valid(self): - form = AddressActivationForm({'email': 'expired@example.org'}) - self.assertTrue(form.is_valid()) - - -class TestAddressConfirmationProfile(ViewTestCase): - """ - Test the confirmation of an email address activation (validating token, - expiration, Mailman API calls etc.). - """ - - def setUp(self): - super(TestAddressConfirmationProfile, self).setUp() - # Create a user and profile. - self.user = User.objects.create_user( - username=u'ler_mm', email=u'ler@mailman.mostdesirable.org', - password=u'pwd') - self.profile = AddressConfirmationProfile.objects.create( - email=u'les@example.org', user=self.user) - # Create a test request object - self.request = RequestFactory().get('/') - - def test_profile_creation(self): - # Profile is created and has all necessary properties. - self.assertEqual(self.profile.email, u'les@example.org') - self.assertEqual(len(self.profile.activation_key), 32) - self.assertTrue(type(self.profile.created), datetime) - - def test_unicode_representation(self): - # Correct unicode representation? - self.assertEqual(unicode(self.profile), - 'Address Confirmation Profile for les@example.org') - - def test_profile_not_expired_default_setting(self): - # A profile created less then a day ago is not expired by default. - delta = timedelta(hours=23) - now = datetime.now() - self.profile.created = now - delta - self.assertFalse(self.profile.is_expired) - - def test_profile_is_expired_default_setting(self): - # A profile older than 1 day is expired by default. - delta = timedelta(days=1, hours=1) - now = datetime.now() - self.profile.created = now - delta - self.assertTrue(self.profile.is_expired) - - def test_profile_is_updated_on_save(self): - key = self.profile.activation_key - created = self.profile.created - self.profile.save() - self.assertNotEqual(self.profile.activation_key, key) - self.assertNotEqual(self.profile.created, created) - - @override_settings( - EMAIL_CONFIRMATION_EXPIRATION_DELTA=timedelta(hours=5)) - def test_profile_not_expired(self): - # A profile older than the timedelta set in the settings is - # expired. - delta = timedelta(hours=6) - now = datetime.now() - self.profile.created = now - delta - self.assertTrue(self.profile.is_expired) - - @override_settings( - EMAIL_BACKEND='django.core.mail.backends.locmem.EmailBackend', - EMAIL_CONFIRMATION_FROM='mailman@mostdesirable.org', - ALLOWED_HOSTS=['another-virtualhost']) - def test_confirmation_link(self): - # The profile obj can send out a confirmation email. - # Simulate a VirtualHost with a different name - self.request.META["HTTP_HOST"] = "another-virtualhost" - # Now send the email - self.profile.send_confirmation_link(self.request) - self.assertEqual(mail.outbox[0].to[0], u'les@example.org') - self.assertEqual(mail.outbox[0].subject, u'Confirmation needed') - self.assertIn(self.profile.activation_key, mail.outbox[0].body) - self.assertIn("another-virtualhost", mail.outbox[0].body) - - -class TestAddressActivationLinkSuccess(ViewTestCase): - """ - This tests the activation link view if the key is valid and the profile is - not expired. - """ - - def setUp(self): - super(TestAddressActivationLinkSuccess, self).setUp() - self.user = User.objects.create_user( - username='ler', email=u'ler@example.org', - password='pwd') - self.mm_user = self.mm_client.create_user('ler@example.org', None) - self.profile = AddressConfirmationProfile.objects.create( - email=u'les@example.org', user=self.user) - self.profile.save() - - def test_add_address(self): - # An activation key pointing to a valid profile adds the address - # to the user. - self.client.login(username='ler', password='pwd') - url = reverse('address_activation_link', - args=[self.profile.activation_key]) - response = self.client.get(url) - self.assertRedirects(response, reverse('ps_user_profile')) - self.assertHasSuccessMessage(response) - self.assertEqual( - set([a.email for a in self.mm_user.addresses]), - set(['ler@example.org', 'les@example.org'])) - logged_in_user = response.wsgi_request.user - self.assertEqual(logged_in_user.other_emails, ['les@example.org']) - - def test_existing_user(self): - # Add an existing address that is already linked to a user - self.mm_client.create_user("les@example.org", None) - self.client.login(username='ler', password='pwd') - url = reverse('address_activation_link', - args=[self.profile.activation_key]) - response = self.client.get(url) - self.assertRedirects(response, reverse('ps_user_profile')) - self.assertHasSuccessMessage(response) - self.assertEqual( - set([a.email for a in self.mm_user.addresses]), - set(['ler@example.org', 'les@example.org'])) - logged_in_user = response.wsgi_request.user - self.assertEqual(logged_in_user.other_emails, ['les@example.org']) diff --git a/src/postorius/tests/mailman_api_tests/test_profile.py b/src/postorius/tests/mailman_api_tests/test_profile.py deleted file mode 100644 index a42743b..0000000 --- a/src/postorius/tests/mailman_api_tests/test_profile.py +++ /dev/null @@ -1,99 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright (C) 2012-2015 by the Free Software Foundation, Inc. -# -# This file is part of Postorius. -# -# Postorius is free software: you can redistribute it and/or modify it under -# the terms of the GNU General Public License as published by the Free -# Software Foundation, either version 3 of the License, or (at your option) -# any later version. -# Postorius is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for -# more details. -# -# You should have received a copy of the GNU General Public License along with -# Postorius. If not, see . - -from __future__ import absolute_import, print_function, unicode_literals - -from django.core.urlresolvers import reverse -from django.contrib.auth.models import User -from mock import patch -from smtplib import SMTPException - -from postorius.models import MailmanUser -from postorius.models import AddressConfirmationProfile -from postorius.tests.utils import ViewTestCase - - -class TestProfile(ViewTestCase): - """ - Tests to make sure the view is properly connected, renders the form - correctly and starts the actual address activation process if a valid - form is submitted. - """ - - def setUp(self): - super(TestProfile, self).setUp() - # We create a new user and log that user in. - # We don't use Client().login because it triggers the browserid dance. - self.user = User.objects.create_user( - username='les', email='les@example.org', password='secret') - self.client.post(reverse('user_login'), - {'username': 'les', 'password': 'secret'}) - - def test_view_contains_form(self): - # The view context should contain a form. - response = self.client.get(reverse('ps_user_profile')) - self.assertContains(response, - 'You can add other addresses to your profile') - - def test_post_invalid_form_shows_error_msg(self): - # Entering an invalid email address should render an error message. - response = self.client.post(reverse('ps_user_profile'), - {'email': 'invalid_email', - 'user_email': self.user.email}) - self.assertContains(response, 'Enter a valid email address.') - - @patch.object(AddressConfirmationProfile, 'send_confirmation_link') - def test_post_valid_form_shows_success_message( - self, mock_send_confirmation_link): - # Entering a valid email should render the activation_sent template. - response = self.client.post(reverse('ps_user_profile'), - {'email': 'new_address@example.org', - 'user_email': self.user.email}, - follow=True) - self.assertEqual(mock_send_confirmation_link.call_count, 1) - self.assertContains(response, 'Please follow the instructions sent ' - 'via email to confirm the address') - - @patch.object(AddressConfirmationProfile, 'send_confirmation_link') - def test_post_valid_form_redirects_on_success( - self, mock_send_confirmation_link): - # Entering a valid email should render the activation_sent template. - response = self.client.post(reverse('ps_user_profile'), { - 'email': 'new_address@example.org', - 'user_email': self.user.email}) - self.assertEqual(mock_send_confirmation_link.call_count, 1) - self.assertRedirects(response, reverse('ps_user_profile')) - - @patch.object(AddressConfirmationProfile, 'send_confirmation_link', - side_effect=SMTPException()) - def test_post_form_with_smtp_exception(self, mock_send_confirmation_link): - # If a smtp exception occurs display error - response = self.client.post(reverse('ps_user_profile'), { - 'email': 'new_address@example.org', - 'user_email': self.user.email}, follow=True) - self.assertEqual(mock_send_confirmation_link.call_count, 1) - self.assertContains(response, 'Currently emails can not be added, ' - 'please try again later') - - def test_change_display_name(self): - # We create a Mailman user, from the django user object. - self.mm_user = MailmanUser.objects.create_from_django(self.user) - self.client.post(reverse('ps_user_profile'), { - 'formname': 'displayname', - 'display_name': 'testname'}) - # The Mailman user's display name, must have been changed correctly. - self.assertEqual(self.mm_user.display_name, 'testname')