Fix linter messages

Signed-off-by: Paul Konstantin Gerke <paulkgerke@craftware.info>
This commit is contained in:
Paul Konstantin Gerke 2022-01-11 21:47:43 +01:00 committed by Christopher Charbonneau Wells
parent 63d0b1373a
commit 53d4759add
1 changed files with 10 additions and 6 deletions

View File

@ -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):