diff --git a/data/test-delete-source.yml b/data/test-delete-source.yml index 984bfc4..9f9d2ee 100644 --- a/data/test-delete-source.yml +++ b/data/test-delete-source.yml @@ -4,97 +4,128 @@ interactions: headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] - Authorization: [Token eyJhbGciOiJIUzI1NiIsImV4cCI6MTU0MDI3NjkxOCwiaWF0IjoxNTQwMjQ4MTE4fQ.eyJpZCI6MX0.fygpQy3CxB1ulUWLFz2UdrtcBKHz-fk5gyRxbcSY720] + Authorization: [Token eyJhbGciOiJIUzI1NiIsImV4cCI6MTU1Mjk3OTkzMSwiaWF0IjoxNTUyOTUxMTMxfQ.eyJpZCI6MX0.9P3wxI-3_VKsD2YC5HZ31pfWuqLEBJsy9aBhW_cdqXE] Connection: [keep-alive] Content-Type: [application/json] User-Agent: [python-requests/2.20.0] method: GET uri: http://127.0.0.1:8081/api/v1/sources response: - body: {string: "{\n \"sources\": [\n {\n \"add_star_url\": \"/api/v1/sources/f1ed565f-ed3f-4316-9de8-56dd8af3b4a4/add_star\", + body: {string: "{\n \"sources\": [\n {\n \"add_star_url\": \"/api/v1/sources/d9eb4d27-b7c8-4599-ba22-daee6d939f17/add_star\", \n \"interaction_count\": 4, \n \"is_flagged\": false, \n \"is_starred\": - false, \n \"journalist_designation\": \"yellow-white fecklessness\", - \n \"key\": {\n \"public\": \"-----BEGIN PGP PUBLIC KEY BLOCK-----\\n\\nmQINBFvOU64BEADXKtc0RnZlzIpI2fM7rH0fhWXJ2oJqTMl9HEX3/G4d05PqSu9R\\nxXczPVAAeCpWR+1PwiBndkeLZ3wBJX7ergkHc+c8zas41HVoPpEKydXSi3n/CgZP\\nDs8t8KbT9N6D5ZCMOGfqr3CXSTtUOYT7BRU/mo47fQgp+5EfL1TKoU7/E65KETK/\\nH7NPJY5F+LFh9X8QjpiwUTcna2l+rWVLHBmhV7s+tnSKpO8bF6ah49QbKPZV7QGG\\nsI0KGOiOK+R5eHPtkImPE2s6EvdLKOerbYD0aZI+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o/CP6SrIJdE1l1Z6RoS0C/\\n=DXES\\n-----END PGP PUBLIC KEY BLOCK-----\\n\", \n \"type\": \"PGP\"\n }, \n \"last_updated\": - \"2018-10-22T22:48:15.508121Z\", \n \"number_of_documents\": 0, \n \"number_of_messages\": - 2, \n \"remove_star_url\": \"/api/v1/sources/f1ed565f-ed3f-4316-9de8-56dd8af3b4a4/remove_star\", - \n \"replies_url\": \"/api/v1/sources/f1ed565f-ed3f-4316-9de8-56dd8af3b4a4/replies\", - \n \"submissions_url\": \"/api/v1/sources/f1ed565f-ed3f-4316-9de8-56dd8af3b4a4/submissions\", - \n \"url\": \"/api/v1/sources/f1ed565f-ed3f-4316-9de8-56dd8af3b4a4\", - \n \"uuid\": \"f1ed565f-ed3f-4316-9de8-56dd8af3b4a4\"\n }, \n {\n - \ \"add_star_url\": \"/api/v1/sources/eb01cec4-7216-4112-b542-fcc9c3979b90/add_star\", + \"2019-03-18T22:23:44.186714Z\", \n \"number_of_documents\": 0, \n \"number_of_messages\": + 2, \n \"remove_star_url\": \"/api/v1/sources/d9eb4d27-b7c8-4599-ba22-daee6d939f17/remove_star\", + \n \"replies_url\": \"/api/v1/sources/d9eb4d27-b7c8-4599-ba22-daee6d939f17/replies\", + \n \"submissions_url\": \"/api/v1/sources/d9eb4d27-b7c8-4599-ba22-daee6d939f17/submissions\", + \n \"url\": \"/api/v1/sources/d9eb4d27-b7c8-4599-ba22-daee6d939f17\", + \n \"uuid\": \"d9eb4d27-b7c8-4599-ba22-daee6d939f17\"\n }, \n {\n + \ \"add_star_url\": \"/api/v1/sources/8b8325d9-20a5-4687-8bdf-f0d45408ca38/add_star\", \n \"interaction_count\": 4, \n \"is_flagged\": false, \n \"is_starred\": - false, \n \"journalist_designation\": \"downstairs depth\", \n \"key\": - {\n \"public\": \"-----BEGIN PGP PUBLIC KEY BLOCK-----\\n\\nmQINBFvOU7ABEADagsl6IqF46/B502qxTKB2OS6FsqQT3BOyseZpALgvrs7tBmsU\\n9qZrEZ5m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\\neP+1r5EfdEr4f0yvT7LhiUOWpPJSlobgQtb0up75eVjJeuSlYd2l2DYi8Lo6K+pX\\ndq1g532s/Elc7GpJfvanfR8lz5NVerAe1oYccjWF4iukiID1MsdVS0LMk4zRklND\\nolOoHOY+Set6jdvbC2y8bDr/o92wgBiTVL1tBqY66xIDN/F+sxFtF7slg9hMrIN8\\nIlhCEURDm/H6HeJn4hqGSCfbCL2DwZb1/X5eYc0w1y69tyzCgiGVUdwMu34LfurU\\nxQeX+CLXhNrbi4iVUJkH8L3NRhSIiemfss032oswXWzidwDjv9iwAYC6dbYy/4al\\n39Prp9chEt23bWJ20F/t7nsyDyGO3u1Y2wFUXev5FZ0seNAuDRkjwSltgvAumB+x\\noB7n6MeN8wHckbVMLYkwKxg2PT+V7mj8zVdwTMfmfV7opoDRxHtvLzCJAveUOhnR\\n6iwt4dtDm08FjBoot1bVz15jqtR+MLbdoYGMFnuBOXJ7jym0mmQjLb3kGpbEwD03\\ndUPFTKGdN/KLrYD005pi8cBIFKznKKs/WZkSQGnUG7Q=\\n=AoO+\\n-----END + false, \n \"journalist_designation\": \"untrammeled dancing\", \n \"key\": + {\n \"public\": \"-----BEGIN PGP PUBLIC KEY BLOCK-----\\n\\nmQINBFGRfoABEADzzNyczWaTEHPlB0YCa6Kxu4tXmXl7VOXdfCPb7G6XkjWGBSKN\\nQqPJ0rsfilX00vRLf2xxf4036zZ0CO358405eDmN/BNBtLahP8EJBTDi40NebdXf\\nxNE0gaos/MkMIL9fL2SJHcUvJZj7+YfBe+9FatRf1M7+m4Zh4KfRK3xaF0VYGRuo\\nGZ551+16D7243TaM+KNy1oEy3kYXxU32/pdqrxJ4jAGy4J6l++M47o5i0drNbQ4D\\nVNQgYihhCLWGdMAIcF8ORg8j3s196Xv9tQSl89eofw22ccAfqoHCVdcbvcZQ0YKU\\noVXrUoALdueS4imyksmOaKjhJANCxs7ChEnHRNcpGN0XbGITwT6rjLeNCYAVdYVM\\nb4fqM2wHA/y+g3hElrBiBH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8jY9fidqqpidZ50IX5lEI2s3/QaouldLhlAKqKH0e5\\nCgmg2F68MJN1o/LbYPCt5hE8xCI9i3Q//MefQKG3GspFRdS3BiXyoLwTf7HrGOoC\\nXzC7byFTxOMYPYj/EYTQd8I6NByvjGbRYMZrv6Dy6NAqZobq9QdrR/F7kYiTLRF/\\ncd3FLzg6d15rMyHMeEQQCj/8Bzrbx0QV\\n=e2OF\\n-----END PGP PUBLIC KEY BLOCK-----\\n\", \n \"type\": \"PGP\"\n }, \n \"last_updated\": - \"2018-10-22T22:48:17.821470Z\", \n \"number_of_documents\": 0, \n \"number_of_messages\": - 2, \n \"remove_star_url\": \"/api/v1/sources/eb01cec4-7216-4112-b542-fcc9c3979b90/remove_star\", - \n \"replies_url\": \"/api/v1/sources/eb01cec4-7216-4112-b542-fcc9c3979b90/replies\", - \n \"submissions_url\": \"/api/v1/sources/eb01cec4-7216-4112-b542-fcc9c3979b90/submissions\", - \n \"url\": \"/api/v1/sources/eb01cec4-7216-4112-b542-fcc9c3979b90\", - \n \"uuid\": \"eb01cec4-7216-4112-b542-fcc9c3979b90\"\n }\n ]\n}\n"} + \"2019-03-18T22:23:46.635201Z\", \n \"number_of_documents\": 0, \n \"number_of_messages\": + 2, \n \"remove_star_url\": \"/api/v1/sources/8b8325d9-20a5-4687-8bdf-f0d45408ca38/remove_star\", + \n \"replies_url\": \"/api/v1/sources/8b8325d9-20a5-4687-8bdf-f0d45408ca38/replies\", + \n \"submissions_url\": \"/api/v1/sources/8b8325d9-20a5-4687-8bdf-f0d45408ca38/submissions\", + \n \"url\": \"/api/v1/sources/8b8325d9-20a5-4687-8bdf-f0d45408ca38\", + \n \"uuid\": \"8b8325d9-20a5-4687-8bdf-f0d45408ca38\"\n }\n ]\n}\n"} headers: - Content-Length: ['5244'] + Content-Length: ['5210'] Content-Type: [application/json] - Date: ['Mon, 22 Oct 2018 22:48:28 GMT'] - Server: [Werkzeug/0.14.1 Python/2.7.6] - Set-Cookie: [js=eyJleHBpcmVzIjp7IiBkIjoiVHVlLCAyMyBPY3QgMjAxOCAwMDo0ODoyOCBHTVQifX0.Dq_lPA.xCBt3s1su7-BcVhsHXG7gP-oQD0; - HttpOnly; Path=/] - Vary: [Cookie] + Date: ['Mon, 18 Mar 2019 23:18:51 GMT'] + Server: [Werkzeug/0.14.1 Python/2.7.12] status: {code: 200, message: OK} - request: body: null headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] - Authorization: [Token eyJhbGciOiJIUzI1NiIsImV4cCI6MTU0MDI3NjkxOCwiaWF0IjoxNTQwMjQ4MTE4fQ.eyJpZCI6MX0.fygpQy3CxB1ulUWLFz2UdrtcBKHz-fk5gyRxbcSY720] + Authorization: [Token eyJhbGciOiJIUzI1NiIsImV4cCI6MTU1Mjk3OTkzMSwiaWF0IjoxNTUyOTUxMTMxfQ.eyJpZCI6MX0.9P3wxI-3_VKsD2YC5HZ31pfWuqLEBJsy9aBhW_cdqXE] + Connection: [keep-alive] + Content-Type: [application/json] + User-Agent: [python-requests/2.20.0] + method: GET + uri: http://127.0.0.1:8081/api/v1/sources + response: + body: {string: "{\n \"sources\": [\n {\n \"add_star_url\": \"/api/v1/sources/d9eb4d27-b7c8-4599-ba22-daee6d939f17/add_star\", + \n \"interaction_count\": 4, \n \"is_flagged\": false, \n \"is_starred\": + false, \n \"journalist_designation\": \"raging azure\", \n \"key\": + {\n \"public\": \"-----BEGIN PGP PUBLIC KEY BLOCK-----\\n\\nmQINBFGRfoABEADEQMD9oHNCk7gvgk6/W2kx+DkaoM1I24fDlx3soKXqmRjyK1MK\\nx/ecx6ta3I1KRIwl6Iy1QCEhGjmR3PNEY61n6n2Jv8n2NtDx31Gagp1f8ckhPtYq\\n2BP9VzxkTIqbwi6oOaKl3GCarkZD1/detSH8Sdzk9uzlE49Qn/wCsFyW69GtJBFT\\nVZ0F5hPJItXOAT1mHrRc1Hl/lsmax61rqLGuvuCxnpe3UrDKtfxL2uNKzGYm687P\\nAxVBbHE7HlOLJ8YAVlIJ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jlfqa7JglA54cWPd9WkRlT+cUlCUlctowgpTiAA0uzc3bu6YQ7RefGU5qnLIH\\ndDtAzIDTCeJdaJZvd2MaV0KICe4mU2RpJYlDSVUfzVb/xK6vVN6maN5tnJ6dpirj\\nA6WhGl+aKA4Ou6ok1mOHLEfAcCEbUrR8FF1MPZ9/DWRYpQpJhAfBG3pSfUByf5/w\\nt3WVNpiXWet/DXwFLsUpra7sNAb5+BFaEv22Y2bFF0TEkai39PdKUnVzc7jjSRvZ\\n84cfRurWK9GR8ynSLEmu47/beWzRIO5qBe3VIdDUL2w0PhH/rKiGg5zBDy8b8otz\\n2OCPH1/t36o/CP6SrIJdE1l1Z6RoS0C/\\n=DXES\\n-----END + PGP PUBLIC KEY BLOCK-----\\n\", \n \"type\": \"PGP\"\n }, \n \"last_updated\": + \"2019-03-18T22:23:44.186714Z\", \n \"number_of_documents\": 0, \n \"number_of_messages\": + 2, \n \"remove_star_url\": \"/api/v1/sources/d9eb4d27-b7c8-4599-ba22-daee6d939f17/remove_star\", + \n \"replies_url\": \"/api/v1/sources/d9eb4d27-b7c8-4599-ba22-daee6d939f17/replies\", + \n \"submissions_url\": \"/api/v1/sources/d9eb4d27-b7c8-4599-ba22-daee6d939f17/submissions\", + \n \"url\": \"/api/v1/sources/d9eb4d27-b7c8-4599-ba22-daee6d939f17\", + \n \"uuid\": \"d9eb4d27-b7c8-4599-ba22-daee6d939f17\"\n }, \n {\n + \ \"add_star_url\": \"/api/v1/sources/8b8325d9-20a5-4687-8bdf-f0d45408ca38/add_star\", + \n \"interaction_count\": 4, \n \"is_flagged\": false, \n \"is_starred\": + false, \n \"journalist_designation\": \"untrammeled dancing\", \n \"key\": + {\n \"public\": \"-----BEGIN PGP PUBLIC KEY BLOCK-----\\n\\nmQINBFGRfoABEADzzNyczWaTEHPlB0YCa6Kxu4tXmXl7VOXdfCPb7G6XkjWGBSKN\\nQqPJ0rsfilX00vRLf2xxf4036zZ0CO358405eDmN/BNBtLahP8EJBTDi40NebdX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wDpsfO/Tv3q5YFbNaGn5kPvUGaVbxhRODqaNcxE/24AxgtrimPpbaf3s5zWERf5k\\nTC6PUq2z3qEmtuKUkj8skBv5DFkaAeq7Ulx4PPkaeguLvQOIhRHDie3pX9cuak2B\\nb/7lFs4FKpMGE4XSkOqXJY4q/kkKlEk7x9sTqI29tkOVbhYaUBw6vDT+O/zLxjg1\\nvKPXFO7ylegdAECUSIJnzDqyN9v+hVOXxt726EYYfMQqIo384zZOp/JOngNWKNfr\\nT2VhBnANjeLCqLcN3ofwJK8jY9fidqqpidZ50IX5lEI2s3/QaouldLhlAKqKH0e5\\nCgmg2F68MJN1o/LbYPCt5hE8xCI9i3Q//MefQKG3GspFRdS3BiXyoLwTf7HrGOoC\\nXzC7byFTxOMYPYj/EYTQd8I6NByvjGbRYMZrv6Dy6NAqZobq9QdrR/F7kYiTLRF/\\ncd3FLzg6d15rMyHMeEQQCj/8Bzrbx0QV\\n=e2OF\\n-----END + PGP PUBLIC KEY BLOCK-----\\n\", \n \"type\": \"PGP\"\n }, \n \"last_updated\": + \"2019-03-18T22:23:46.635201Z\", \n \"number_of_documents\": 0, \n \"number_of_messages\": + 2, \n \"remove_star_url\": \"/api/v1/sources/8b8325d9-20a5-4687-8bdf-f0d45408ca38/remove_star\", + \n \"replies_url\": \"/api/v1/sources/8b8325d9-20a5-4687-8bdf-f0d45408ca38/replies\", + \n \"submissions_url\": \"/api/v1/sources/8b8325d9-20a5-4687-8bdf-f0d45408ca38/submissions\", + \n \"url\": \"/api/v1/sources/8b8325d9-20a5-4687-8bdf-f0d45408ca38\", + \n \"uuid\": \"8b8325d9-20a5-4687-8bdf-f0d45408ca38\"\n }\n ]\n}\n"} + headers: + Content-Length: ['5210'] + Content-Type: [application/json] + Date: ['Mon, 18 Mar 2019 23:18:51 GMT'] + Server: [Werkzeug/0.14.1 Python/2.7.12] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Authorization: [Token eyJhbGciOiJIUzI1NiIsImV4cCI6MTU1Mjk3OTkzMSwiaWF0IjoxNTUyOTUxMTMxfQ.eyJpZCI6MX0.9P3wxI-3_VKsD2YC5HZ31pfWuqLEBJsy9aBhW_cdqXE] Connection: [keep-alive] Content-Length: ['0'] Content-Type: [application/json] User-Agent: [python-requests/2.20.0] method: DELETE - uri: http://127.0.0.1:8081/api/v1/sources/f1ed565f-ed3f-4316-9de8-56dd8af3b4a4 + uri: http://127.0.0.1:8081/api/v1/sources/d9eb4d27-b7c8-4599-ba22-daee6d939f17 response: body: {string: "{\n \"message\": \"Source and submissions deleted\"\n}\n"} headers: Content-Length: ['50'] Content-Type: [application/json] - Date: ['Mon, 22 Oct 2018 22:48:28 GMT'] - Server: [Werkzeug/0.14.1 Python/2.7.6] - Set-Cookie: [js=eyJleHBpcmVzIjp7IiBkIjoiVHVlLCAyMyBPY3QgMjAxOCAwMDo0ODoyOCBHTVQifX0.Dq_lPA.xCBt3s1su7-BcVhsHXG7gP-oQD0; - HttpOnly; Path=/] - Vary: [Cookie] + Date: ['Mon, 18 Mar 2019 23:18:51 GMT'] + Server: [Werkzeug/0.14.1 Python/2.7.12] status: {code: 200, message: OK} - request: body: null headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] - Authorization: [Token eyJhbGciOiJIUzI1NiIsImV4cCI6MTU0MDI3NjkxOCwiaWF0IjoxNTQwMjQ4MTE4fQ.eyJpZCI6MX0.fygpQy3CxB1ulUWLFz2UdrtcBKHz-fk5gyRxbcSY720] + Authorization: [Token eyJhbGciOiJIUzI1NiIsImV4cCI6MTU1Mjk3OTkzMSwiaWF0IjoxNTUyOTUxMTMxfQ.eyJpZCI6MX0.9P3wxI-3_VKsD2YC5HZ31pfWuqLEBJsy9aBhW_cdqXE] Connection: [keep-alive] Content-Type: [application/json] User-Agent: [python-requests/2.20.0] method: GET uri: http://127.0.0.1:8081/api/v1/sources response: - body: {string: "{\n \"sources\": [\n {\n \"add_star_url\": \"/api/v1/sources/eb01cec4-7216-4112-b542-fcc9c3979b90/add_star\", + body: {string: "{\n \"sources\": [\n {\n \"add_star_url\": \"/api/v1/sources/8b8325d9-20a5-4687-8bdf-f0d45408ca38/add_star\", \n \"interaction_count\": 4, \n \"is_flagged\": false, \n \"is_starred\": - false, \n \"journalist_designation\": \"downstairs depth\", \n \"key\": - {\n \"public\": \"-----BEGIN PGP PUBLIC KEY BLOCK-----\\n\\nmQINBFvOU7ABEADagsl6IqF46/B502qxTKB2OS6FsqQT3BOyseZpALgvrs7tBmsU\\n9qZrEZ5mEVKQK0wA/4Axt+J0rwNieC3egz/hSfJrxdedIEeX6GYJpN9C2tGj2X1Q\\nn9OCPT7GtgVuwUX+2WUyVsmcikF0gQL+VgFAW3TRAT1qWZ2TROYloQGvZZNJM7cx\\n/UKZDOBxyuuhgn1OqSXQF9W/tzZB+7TfN1xdxMDlfr4JVMuh8H2dK+KLdfcaw3BK\\ndOEw8XWTkqDK9E7ZHbzQImOqWJG0TMvo1k02zuPiA2E4JQHg7+mnL8rrRjZ92k+3\\ndsfWoNhKqlcy8Yd9uxb4OY3uo4u+VF6fShTpbYngYmFImg/54C1rge0UpZX0uc1f\\ndYJP6GH41NC/+kaUROTq66tVsKZM+jewIs+FvgvUmLF0jH2Tv/o2K0urw8LNiY9W\\nc+3zkNAq+K/Q+QjhLF7fFXUf7JVT7z3pyjuphrLmUT+yyJvFGOjAOau0YKygCoiG\\nHWmneB1SFoY2d5CnyWW1tfaG2TcN8Beiv1tOLayvLmweVCyyrziidOjwRx3yKDdd\\nD0XyJ2ducIfN4z04OVb14Bfbq4D9s1MpZ4P+jRQcEx+F6xS+Zm/UWOrZgGElCDMs\\nKzVGy4G090xGGKdyqt3d+yEMVHoI1TbWnHdIMzALL4SpIBL36aPouWa56QARAQAB\\ntHxBdXRvZ2VuZXJhdGVkIEtleSA8SENCQ040SVpVTjY0RkEyNTNCTlVLTkMzNUFE\\nRk5DQlgzRkhJSjVIRElSQk1DUEdDSTZSQk03T1M0VUgyV1NUQzI1WkVaU1JOWFkz\\nU1VZV1ZNN1ZTWUhMNEJPTjNNWUhDTVg2RzVUQT0+iQI/BBMBCgApBQJbzlOwAhsv\\nBQkB4JuQBwsJCAcDAgEGFQgCCQoLBBYCAwECHgECF4AACgkQJa7v8Llgs7oVBA/9\\nHZMYvqlcRBca1UHTF8TVR3DhB97TN34smOvGNlh8OJEoPQ+4GKIcbToJ1cgWSf6Q\\nHECs/++DJYSlEj1fRi3xPDxMOKerkzCU6Hm0g1FzX7O/v/p0OpTGgLC3PSFMTZ26\\neP+1r5EfdEr4f0yvT7LhiUOWpPJSlobgQtb0up75eVjJeuSlYd2l2DYi8Lo6K+pX\\ndq1g532s/Elc7GpJfvanfR8lz5NVerAe1oYccjWF4iukiID1MsdVS0LMk4zRklND\\nolOoHOY+Set6jdvbC2y8bDr/o92wgBiTVL1tBqY66xIDN/F+sxFtF7slg9hMrIN8\\nIlhCEURDm/H6HeJn4hqGSCfbCL2DwZb1/X5eYc0w1y69tyzCgiGVUdwMu34LfurU\\nxQeX+CLXhNrbi4iVUJkH8L3NRhSIiemfss032oswXWzidwDjv9iwAYC6dbYy/4al\\n39Prp9chEt23bWJ20F/t7nsyDyGO3u1Y2wFUXev5FZ0seNAuDRkjwSltgvAumB+x\\noB7n6MeN8wHckbVMLYkwKxg2PT+V7mj8zVdwTMfmfV7opoDRxHtvLzCJAveUOhnR\\n6iwt4dtDm08FjBoot1bVz15jqtR+MLbdoYGMFnuBOXJ7jym0mmQjLb3kGpbEwD03\\ndUPFTKGdN/KLrYD005pi8cBIFKznKKs/WZkSQGnUG7Q=\\n=AoO+\\n-----END + false, \n \"journalist_designation\": \"untrammeled dancing\", \n \"key\": + {\n \"public\": \"-----BEGIN PGP PUBLIC KEY BLOCK-----\\n\\nmQINBFGRfoABEADzzNyczWaTEHPlB0YCa6Kxu4tXmXl7VOXdfCPb7G6XkjWGBSKN\\nQqPJ0rsfilX00vRLf2xxf4036zZ0CO358405eDmN/BNBtLahP8EJB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/BZv1\\nwDpsfO/Tv3q5YFbNaGn5kPvUGaVbxhRODqaNcxE/24AxgtrimPpbaf3s5zWERf5k\\nTC6PUq2z3qEmtuKUkj8skBv5DFkaAeq7Ulx4PPkaeguLvQOIhRHDie3pX9cuak2B\\nb/7lFs4FKpMGE4XSkOqXJY4q/kkKlEk7x9sTqI29tkOVbhYaUBw6vDT+O/zLxjg1\\nvKPXFO7ylegdAECUSIJnzDqyN9v+hVOXxt726EYYfMQqIo384zZOp/JOngNWKNfr\\nT2VhBnANjeLCqLcN3ofwJK8jY9fidqqpidZ50IX5lEI2s3/QaouldLhlAKqKH0e5\\nCgmg2F68MJN1o/LbYPCt5hE8xCI9i3Q//MefQKG3GspFRdS3BiXyoLwTf7HrGOoC\\nXzC7byFTxOMYPYj/EYTQd8I6NByvjGbRYMZrv6Dy6NAqZobq9QdrR/F7kYiTLRF/\\ncd3FLzg6d15rMyHMeEQQCj/8Bzrbx0QV\\n=e2OF\\n-----END PGP PUBLIC KEY BLOCK-----\\n\", \n \"type\": \"PGP\"\n }, \n \"last_updated\": - \"2018-10-22T22:48:17.821470Z\", \n \"number_of_documents\": 0, \n \"number_of_messages\": - 2, \n \"remove_star_url\": \"/api/v1/sources/eb01cec4-7216-4112-b542-fcc9c3979b90/remove_star\", - \n \"replies_url\": \"/api/v1/sources/eb01cec4-7216-4112-b542-fcc9c3979b90/replies\", - \n \"submissions_url\": \"/api/v1/sources/eb01cec4-7216-4112-b542-fcc9c3979b90/submissions\", - \n \"url\": \"/api/v1/sources/eb01cec4-7216-4112-b542-fcc9c3979b90\", - \n \"uuid\": \"eb01cec4-7216-4112-b542-fcc9c3979b90\"\n }\n ]\n}\n"} + \"2019-03-18T22:23:46.635201Z\", \n \"number_of_documents\": 0, \n \"number_of_messages\": + 2, \n \"remove_star_url\": \"/api/v1/sources/8b8325d9-20a5-4687-8bdf-f0d45408ca38/remove_star\", + \n \"replies_url\": \"/api/v1/sources/8b8325d9-20a5-4687-8bdf-f0d45408ca38/replies\", + \n \"submissions_url\": \"/api/v1/sources/8b8325d9-20a5-4687-8bdf-f0d45408ca38/submissions\", + \n \"url\": \"/api/v1/sources/8b8325d9-20a5-4687-8bdf-f0d45408ca38\", + \n \"uuid\": \"8b8325d9-20a5-4687-8bdf-f0d45408ca38\"\n }\n ]\n}\n"} headers: - Content-Length: ['2628'] + Content-Length: ['2619'] Content-Type: [application/json] - Date: ['Mon, 22 Oct 2018 22:48:28 GMT'] - Server: [Werkzeug/0.14.1 Python/2.7.6] - Set-Cookie: [js=eyJleHBpcmVzIjp7IiBkIjoiVHVlLCAyMyBPY3QgMjAxOCAwMDo0ODoyOCBHTVQifX0.Dq_lPA.xCBt3s1su7-BcVhsHXG7gP-oQD0; - HttpOnly; Path=/] - Vary: [Cookie] + Date: ['Mon, 18 Mar 2019 23:18:51 GMT'] + Server: [Werkzeug/0.14.1 Python/2.7.12] status: {code: 200, message: OK} version: 1 diff --git a/data/test-setup.yml b/data/test-setup.yml index 16c82fe..3d9f00c 100644 --- a/data/test-setup.yml +++ b/data/test-setup.yml @@ -1,7 +1,7 @@ interactions: - request: - body: '{"username": "journalist", "one_time_code": "775867", "passphrase": "correct - horse battery staple profanity oil chewy"}' + body: '{"passphrase": "correct horse battery staple profanity oil chewy", "username": + "journalist", "one_time_code": "030598"}' headers: Accept: ['*/*'] Accept-Encoding: ['gzip, deflate'] @@ -11,12 +11,12 @@ interactions: method: POST uri: http://127.0.0.1:8081/api/v1/token response: - body: {string: "{\n \"expiration\": \"2019-03-19T06:28:35.634671Z\", \n \"journalist_uuid\": - \"33ae0b48-99fd-4eb5-94b0-d98a999a8438\", \n \"token\": \"eyJhbGciOiJIUzI1NiIsImV4cCI6MTU1Mjk3NjkxNSwiaWF0IjoxNTUyOTQ4MTE1fQ.eyJpZCI6MX0.wFd17YM9k5t7KfMJHBoAcbsW0fATcoDleZbTdv92sto\"\n}\n"} + body: {string: "{\n \"expiration\": \"2019-03-19T07:18:51.237288Z\", \n \"journalist_uuid\": + \"33ae0b48-99fd-4eb5-94b0-d98a999a8438\", \n \"token\": \"eyJhbGciOiJIUzI1NiIsImV4cCI6MTU1Mjk3OTkzMSwiaWF0IjoxNTUyOTUxMTMxfQ.eyJpZCI6MX0.9P3wxI-3_VKsD2YC5HZ31pfWuqLEBJsy9aBhW_cdqXE\"\n}\n"} headers: Content-Length: ['250'] Content-Type: [application/json] - Date: ['Mon, 18 Mar 2019 22:28:35 GMT'] + Date: ['Mon, 18 Mar 2019 23:18:51 GMT'] Server: [Werkzeug/0.14.1 Python/2.7.12] status: {code: 200, message: OK} version: 1 diff --git a/tests/test_api.py b/tests/test_api.py index 2f0078a..4875211 100644 --- a/tests/test_api.py +++ b/tests/test_api.py @@ -124,21 +124,25 @@ def test_flag_source(self): @vcr.use_cassette("data/test-delete-source.yml") def test_delete_source(self): + number_of_sources_before = len(self.api.get_sources()) + s = self.api.get_sources()[0] self.assertTrue(self.api.delete_source(s)) - # Now there should be one source left + # Now there should be one less source sources = self.api.get_sources() - self.assertEqual(len(sources), 1) + self.assertEqual(len(sources), number_of_sources_before - 1) @vcr.use_cassette("data/test-delete-source.yml") def test_delete_source_from_string(self): + number_of_sources_before = len(self.api.get_sources()) + s = self.api.get_sources()[0] self.assertTrue(self.api.delete_source_from_string(s.uuid)) - # Now there should be one source left + # Now there should be one less source sources = self.api.get_sources() - self.assertEqual(len(sources), 1) + self.assertEqual(len(sources), number_of_sources_before - 1) @vcr.use_cassette("data/test-delete-submission.yml") def test_delete_submission(self):