From 467739e0c8c3696ca116d88d5fabe69b789b770b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BE=9D=E7=91=AA=E8=B2=93?= Date: Tue, 6 Dec 2022 07:03:12 +0800 Subject: [PATCH] Revised the test_run test of the RunTestCase test case to test if the result is successful. --- tests/test_run.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/test_run.py b/tests/test_run.py index 710f32f..5643d94 100644 --- a/tests/test_run.py +++ b/tests/test_run.py @@ -90,6 +90,8 @@ class RunTestCase(unittest.TestCase): "debit-8-account": "6273", "notes": "yammy"}) self.assertEqual(response.status_code, 302) + self.assertNotEqual(response.headers["Location"], + "/accounting/transactions/expense/create?r=/ok") response = self.client.post( "/accounting/transactions/income/create?r=/ok", @@ -104,6 +106,8 @@ class RunTestCase(unittest.TestCase): "credit-6-account": "4611", "notes": "wonderful"}) self.assertEqual(response.status_code, 302) + self.assertNotEqual(response.headers["Location"], + "/accounting/transactions/income/create?r=/ok") response = self.client.post( "/accounting/transactions/transfer/create?r=/ok", @@ -126,3 +130,5 @@ class RunTestCase(unittest.TestCase): "credit-6-account": "1111", "notes": "nothing"}) self.assertEqual(response.status_code, 302) + self.assertNotEqual(response.headers["Location"], + "/accounting/transactions/transfer/create?r=/ok")