mirror of https://github.com/snachodog/mybuddy.git
Fix linter messages
Signed-off-by: Paul Konstantin Gerke <paulkgerke@craftware.info>
This commit is contained in:
parent
63d0b1373a
commit
53d4759add
16
api/tests.py
16
api/tests.py
|
@ -397,13 +397,13 @@ class TimerAPITestCase(TestBase.BabyBuddyAPITestCaseBase):
|
||||||
})
|
})
|
||||||
self.assertEqual(response.status_code, status.HTTP_200_OK)
|
self.assertEqual(response.status_code, status.HTTP_200_OK)
|
||||||
self.assertEqual(response.data, entry)
|
self.assertEqual(response.data, entry)
|
||||||
|
|
||||||
def test_start_stop_timer(self):
|
def test_start_stop_timer(self):
|
||||||
endpoint = '{}{}/'.format(self.endpoint, 1)
|
endpoint = '{}{}/'.format(self.endpoint, 1)
|
||||||
response = self.client.get(endpoint)
|
response = self.client.get(endpoint)
|
||||||
self.assertEqual(response.status_code, status.HTTP_200_OK)
|
self.assertEqual(response.status_code, status.HTTP_200_OK)
|
||||||
self.assertFalse(response.data["active"])
|
self.assertFalse(response.data["active"])
|
||||||
|
|
||||||
response = self.client.patch(f"{endpoint}restart/")
|
response = self.client.patch(f"{endpoint}restart/")
|
||||||
self.assertEqual(response.status_code, status.HTTP_200_OK)
|
self.assertEqual(response.status_code, status.HTTP_200_OK)
|
||||||
|
|
||||||
|
@ -413,18 +413,22 @@ class TimerAPITestCase(TestBase.BabyBuddyAPITestCaseBase):
|
||||||
|
|
||||||
# Restart twice fails
|
# Restart twice fails
|
||||||
response = self.client.patch(f"{endpoint}restart/")
|
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/")
|
response = self.client.patch(f"{endpoint}stop/")
|
||||||
self.assertEqual(response.status_code, status.HTTP_200_OK)
|
self.assertEqual(response.status_code, status.HTTP_200_OK)
|
||||||
|
|
||||||
response = self.client.get(endpoint)
|
response = self.client.get(endpoint)
|
||||||
self.assertEqual(response.status_code, status.HTTP_200_OK)
|
self.assertEqual(response.status_code, status.HTTP_200_OK)
|
||||||
self.assertFalse(response.data["active"])
|
self.assertFalse(response.data["active"])
|
||||||
|
|
||||||
# Stopping twice fails
|
# Stopping twice fails
|
||||||
response = self.client.patch(f"{endpoint}stop/")
|
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):
|
class TummyTimeAPITestCase(TestBase.BabyBuddyAPITestCaseBase):
|
||||||
|
|
Loading…
Reference in New Issue