From b2bacc9f8b2e15092da74d4f1d33b2cb20b0a527 Mon Sep 17 00:00:00 2001 From: lucasheld Date: Fri, 26 Aug 2022 17:02:55 +0200 Subject: [PATCH] rename 2FA token --- tests/test_status_page.py | 4 ++++ uptime_kuma_api/api.py | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/test_status_page.py b/tests/test_status_page.py index f85d854..79b7c0c 100644 --- a/tests/test_status_page.py +++ b/tests/test_status_page.py @@ -67,9 +67,13 @@ class TestStatusPage(UptimeKumaTestCase): } incident = self.api.post_incident(slug, **incident_expected) self.compare(incident, incident_expected) + status_page = self.api.get_status_page(slug) + self.compare(status_page["incident"], incident) # unpin incident self.api.unpin_incident(slug) + status_page = self.api.get_status_page(slug) + self.assertIsNone(status_page["incident"]) # delete status page self.api.delete_status_page(slug) diff --git a/uptime_kuma_api/api.py b/uptime_kuma_api/api.py index fe221e1..e4481e4 100644 --- a/uptime_kuma_api/api.py +++ b/uptime_kuma_api/api.py @@ -839,11 +839,11 @@ class UptimeKumaApi(object): # login - def login(self, username: str, password: str, twofa_token: str = ""): + def login(self, username: str, password: str, token: str = ""): return self._call('login', { "username": username, "password": password, - "token": twofa_token + "token": token }) def login_by_token(self, token: str):