From 53d4759add18a2157a2bec6abf55af5484fedc94 Mon Sep 17 00:00:00 2001 From: Paul Konstantin Gerke Date: Tue, 11 Jan 2022 21:47:43 +0100 Subject: [PATCH] Fix linter messages Signed-off-by: Paul Konstantin Gerke --- api/tests.py | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/api/tests.py b/api/tests.py index 6d0b77db..d0bd0d55 100644 --- a/api/tests.py +++ b/api/tests.py @@ -397,13 +397,13 @@ class TimerAPITestCase(TestBase.BabyBuddyAPITestCaseBase): }) self.assertEqual(response.status_code, status.HTTP_200_OK) self.assertEqual(response.data, entry) - + def test_start_stop_timer(self): endpoint = '{}{}/'.format(self.endpoint, 1) response = self.client.get(endpoint) self.assertEqual(response.status_code, status.HTTP_200_OK) self.assertFalse(response.data["active"]) - + response = self.client.patch(f"{endpoint}restart/") self.assertEqual(response.status_code, status.HTTP_200_OK) @@ -413,18 +413,22 @@ class TimerAPITestCase(TestBase.BabyBuddyAPITestCaseBase): # Restart twice fails response = self.client.patch(f"{endpoint}restart/") - self.assertEqual(response.status_code, status.HTTP_412_PRECONDITION_FAILED) - + self.assertEqual( + response.status_code, status.HTTP_412_PRECONDITION_FAILED + ) + response = self.client.patch(f"{endpoint}stop/") self.assertEqual(response.status_code, status.HTTP_200_OK) - + response = self.client.get(endpoint) self.assertEqual(response.status_code, status.HTTP_200_OK) self.assertFalse(response.data["active"]) # Stopping twice fails response = self.client.patch(f"{endpoint}stop/") - self.assertEqual(response.status_code, status.HTTP_412_PRECONDITION_FAILED) + self.assertEqual( + response.status_code, status.HTTP_412_PRECONDITION_FAILED + ) class TummyTimeAPITestCase(TestBase.BabyBuddyAPITestCaseBase):