From 255aacefb3c070428e3a4f91dccbfb37df22e907 Mon Sep 17 00:00:00 2001 From: Baptiste Jonglez Date: Wed, 14 Jul 2021 16:38:32 +0200 Subject: [PATCH] Fix tests for history deletion --- ihatemoney/tests/history_test.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/ihatemoney/tests/history_test.py b/ihatemoney/tests/history_test.py index 5938d832..0c816477 100644 --- a/ihatemoney/tests/history_test.py +++ b/ihatemoney/tests/history_test.py @@ -251,7 +251,11 @@ class HistoryTestCase(IhatemoneyTestCase): ) # Clear Existing Entries - resp = self.client.post("/demo/erase_history", follow_redirects=True) + resp = self.client.post( + "/demo/erase_history", + data={"password": "demo"}, + follow_redirects=True, + ) self.assertEqual(resp.status_code, 200) self.assert_empty_history_logging_disabled() @@ -296,7 +300,12 @@ class HistoryTestCase(IhatemoneyTestCase): self.assertEqual(resp.data.decode("utf-8").count(" -- "), 7) # Clear IP Data - resp = self.client.post("/demo/strip_ip_addresses", follow_redirects=True) + resp = self.client.post( + "/demo/strip_ip_addresses", + data={"password": "123456"}, + follow_redirects=True, + ) + self.assertEqual(resp.status_code, 200) self.assertNotIn( "This project has history disabled. New actions won't appear below. ",