From 155a1f132b3283034eebeb02cccff83a32a6fecf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C4=93teris=20Caune?= Date: Mon, 16 Nov 2020 11:20:01 +0200 Subject: [PATCH] Simplify super() calls in tests --- hc/accounts/tests/test_admin.py | 2 +- hc/accounts/tests/test_check_token.py | 2 +- hc/accounts/tests/test_login.py | 2 +- hc/accounts/tests/test_project.py | 2 +- hc/accounts/tests/test_remove_project.py | 2 +- hc/accounts/tests/test_senddeletionnotices.py | 2 +- hc/accounts/tests/test_transfer_project.py | 4 ++-- hc/api/tests/test_admin.py | 2 +- hc/api/tests/test_badge.py | 2 +- hc/api/tests/test_delete_check.py | 2 +- hc/api/tests/test_get_check.py | 2 +- hc/api/tests/test_get_flips.py | 2 +- hc/api/tests/test_get_pings.py | 2 +- hc/api/tests/test_list_channels.py | 2 +- hc/api/tests/test_list_checks.py | 2 +- hc/api/tests/test_notification_status.py | 2 +- hc/api/tests/test_sendreports.py | 2 +- hc/api/tests/test_update_check.py | 2 +- hc/front/tests/test_add_apprise.py | 2 +- hc/front/tests/test_add_call.py | 2 +- hc/front/tests/test_add_check.py | 2 +- hc/front/tests/test_add_discord.py | 2 +- hc/front/tests/test_add_email.py | 2 +- hc/front/tests/test_add_linenotify.py | 2 +- hc/front/tests/test_add_matrix.py | 2 +- hc/front/tests/test_add_mattermost.py | 2 +- hc/front/tests/test_add_msteams.py | 2 +- hc/front/tests/test_add_opsgenie.py | 2 +- hc/front/tests/test_add_pagertree.py | 2 +- hc/front/tests/test_add_pd.py | 2 +- hc/front/tests/test_add_pdc.py | 2 +- hc/front/tests/test_add_pdc_complete.py | 2 +- hc/front/tests/test_add_pushbullet.py | 2 +- hc/front/tests/test_add_pushover.py | 2 +- hc/front/tests/test_add_shell.py | 2 +- hc/front/tests/test_add_slack.py | 2 +- hc/front/tests/test_add_slack_btn.py | 2 +- hc/front/tests/test_add_sms.py | 2 +- hc/front/tests/test_add_spike.py | 2 +- hc/front/tests/test_add_trello.py | 2 +- hc/front/tests/test_add_victorops.py | 2 +- hc/front/tests/test_add_webhook.py | 2 +- hc/front/tests/test_add_whatsapp.py | 2 +- hc/front/tests/test_add_zulip.py | 2 +- hc/front/tests/test_badges.py | 2 +- hc/front/tests/test_channel_checks.py | 2 +- hc/front/tests/test_copy.py | 2 +- hc/front/tests/test_details.py | 2 +- hc/front/tests/test_edit_webhook.py | 2 +- hc/front/tests/test_filtering_rules.py | 2 +- hc/front/tests/test_log.py | 2 +- hc/front/tests/test_metrics.py | 2 +- hc/front/tests/test_my_checks.py | 2 +- hc/front/tests/test_pause.py | 2 +- hc/front/tests/test_ping_details.py | 2 +- hc/front/tests/test_remove_channel.py | 2 +- hc/front/tests/test_remove_check.py | 2 +- hc/front/tests/test_resume.py | 2 +- hc/front/tests/test_send_test_notification.py | 2 +- hc/front/tests/test_status.py | 4 ++-- hc/front/tests/test_status_single.py | 2 +- hc/front/tests/test_switch_channel.py | 2 +- hc/front/tests/test_transfer.py | 2 +- hc/front/tests/test_unsubscribe_email.py | 2 +- hc/front/tests/test_update_channel.py | 2 +- hc/front/tests/test_update_channel_name.py | 2 +- hc/front/tests/test_update_name.py | 2 +- hc/front/tests/test_update_timeout.py | 2 +- hc/front/tests/test_verify_email.py | 2 +- hc/payments/tests/test_billing_history.py | 2 +- hc/test.py | 2 +- 71 files changed, 73 insertions(+), 73 deletions(-) diff --git a/hc/accounts/tests/test_admin.py b/hc/accounts/tests/test_admin.py index 05b13075..8cd4fd06 100644 --- a/hc/accounts/tests/test_admin.py +++ b/hc/accounts/tests/test_admin.py @@ -3,7 +3,7 @@ from hc.test import BaseTestCase class AccountsAdminTestCase(BaseTestCase): def setUp(self): - super(AccountsAdminTestCase, self).setUp() + super().setUp() self.alice.is_staff = True self.alice.is_superuser = True diff --git a/hc/accounts/tests/test_check_token.py b/hc/accounts/tests/test_check_token.py index 2e0dc002..2a670772 100644 --- a/hc/accounts/tests/test_check_token.py +++ b/hc/accounts/tests/test_check_token.py @@ -4,7 +4,7 @@ from hc.test import BaseTestCase class CheckTokenTestCase(BaseTestCase): def setUp(self): - super(CheckTokenTestCase, self).setUp() + super().setUp() self.profile.token = make_password("secret-token", "login") self.profile.save() diff --git a/hc/accounts/tests/test_login.py b/hc/accounts/tests/test_login.py index 1ae2c9ae..7b683b1f 100644 --- a/hc/accounts/tests/test_login.py +++ b/hc/accounts/tests/test_login.py @@ -7,7 +7,7 @@ from hc.test import BaseTestCase class LoginTestCase(BaseTestCase): def setUp(self): - super(LoginTestCase, self).setUp() + super().setUp() self.checks_url = "/projects/%s/checks/" % self.project.code def test_it_sends_link(self): diff --git a/hc/accounts/tests/test_project.py b/hc/accounts/tests/test_project.py index b777963c..b7d47ca3 100644 --- a/hc/accounts/tests/test_project.py +++ b/hc/accounts/tests/test_project.py @@ -9,7 +9,7 @@ from hc.api.models import TokenBucket class ProjectTestCase(BaseTestCase): def setUp(self): - super(ProjectTestCase, self).setUp() + super().setUp() self.url = "/projects/%s/settings/" % self.project.code diff --git a/hc/accounts/tests/test_remove_project.py b/hc/accounts/tests/test_remove_project.py index e4bd2d4d..1114ae18 100644 --- a/hc/accounts/tests/test_remove_project.py +++ b/hc/accounts/tests/test_remove_project.py @@ -4,7 +4,7 @@ from hc.test import BaseTestCase class RemoveProjectTestCase(BaseTestCase): def setUp(self): - super(RemoveProjectTestCase, self).setUp() + super().setUp() self.url = "/projects/%s/remove/" % self.project.code diff --git a/hc/accounts/tests/test_senddeletionnotices.py b/hc/accounts/tests/test_senddeletionnotices.py index 668f8489..ac549f1c 100644 --- a/hc/accounts/tests/test_senddeletionnotices.py +++ b/hc/accounts/tests/test_senddeletionnotices.py @@ -17,7 +17,7 @@ def counts(result): class SendDeletionNoticesTestCase(BaseTestCase): def setUp(self): - super(SendDeletionNoticesTestCase, self).setUp() + super().setUp() # Make alice eligible for notice -- signed up more than 1 year ago self.alice.date_joined = now() - td(days=500) diff --git a/hc/accounts/tests/test_transfer_project.py b/hc/accounts/tests/test_transfer_project.py index 9a127e1a..48231549 100644 --- a/hc/accounts/tests/test_transfer_project.py +++ b/hc/accounts/tests/test_transfer_project.py @@ -4,9 +4,9 @@ from hc.api.models import Check from hc.test import BaseTestCase -class ProjectTestCase(BaseTestCase): +class TransferProjectTestCase(BaseTestCase): def setUp(self): - super(ProjectTestCase, self).setUp() + super().setUp() Check.objects.create(project=self.project) diff --git a/hc/api/tests/test_admin.py b/hc/api/tests/test_admin.py index 5a6d56ed..5f9a04f6 100644 --- a/hc/api/tests/test_admin.py +++ b/hc/api/tests/test_admin.py @@ -4,7 +4,7 @@ from hc.test import BaseTestCase class ApiAdminTestCase(BaseTestCase): def setUp(self): - super(ApiAdminTestCase, self).setUp() + super().setUp() self.check = Check.objects.create(project=self.project, tags="foo bar") self.alice.is_staff = True diff --git a/hc/api/tests/test_badge.py b/hc/api/tests/test_badge.py index de33b3a9..70d24c93 100644 --- a/hc/api/tests/test_badge.py +++ b/hc/api/tests/test_badge.py @@ -10,7 +10,7 @@ from hc.test import BaseTestCase class BadgeTestCase(BaseTestCase): def setUp(self): - super(BadgeTestCase, self).setUp() + super().setUp() self.check = Check.objects.create(project=self.project, tags="foo bar") sig = base64_hmac(str(self.project.badge_key), "foo", settings.SECRET_KEY) diff --git a/hc/api/tests/test_delete_check.py b/hc/api/tests/test_delete_check.py index 7bb2075c..d06dbc0d 100644 --- a/hc/api/tests/test_delete_check.py +++ b/hc/api/tests/test_delete_check.py @@ -4,7 +4,7 @@ from hc.test import BaseTestCase class DeleteCheckTestCase(BaseTestCase): def setUp(self): - super(DeleteCheckTestCase, self).setUp() + super().setUp() self.check = Check.objects.create(project=self.project) def test_it_works(self): diff --git a/hc/api/tests/test_get_check.py b/hc/api/tests/test_get_check.py index b0d24061..facd1792 100644 --- a/hc/api/tests/test_get_check.py +++ b/hc/api/tests/test_get_check.py @@ -7,7 +7,7 @@ from hc.test import BaseTestCase class GetCheckTestCase(BaseTestCase): def setUp(self): - super(GetCheckTestCase, self).setUp() + super().setUp() self.now = now().replace(microsecond=0) diff --git a/hc/api/tests/test_get_flips.py b/hc/api/tests/test_get_flips.py index ac4b2ea6..ae680dfc 100644 --- a/hc/api/tests/test_get_flips.py +++ b/hc/api/tests/test_get_flips.py @@ -8,7 +8,7 @@ from hc.test import BaseTestCase class GetFlipsTestCase(BaseTestCase): def setUp(self): - super(GetFlipsTestCase, self).setUp() + super().setUp() self.a1 = Check(project=self.project, name="Alice 1") self.a1.timeout = td(seconds=3600) diff --git a/hc/api/tests/test_get_pings.py b/hc/api/tests/test_get_pings.py index d032e727..bcd7546e 100644 --- a/hc/api/tests/test_get_pings.py +++ b/hc/api/tests/test_get_pings.py @@ -6,7 +6,7 @@ from hc.test import BaseTestCase class GetPingsTestCase(BaseTestCase): def setUp(self): - super(GetPingsTestCase, self).setUp() + super().setUp() self.a1 = Check(project=self.project, name="Alice 1") self.a1.timeout = td(seconds=3600) diff --git a/hc/api/tests/test_list_channels.py b/hc/api/tests/test_list_channels.py index 17bfa65d..7a9a8289 100644 --- a/hc/api/tests/test_list_channels.py +++ b/hc/api/tests/test_list_channels.py @@ -6,7 +6,7 @@ from hc.test import BaseTestCase class ListChannelsTestCase(BaseTestCase): def setUp(self): - super(ListChannelsTestCase, self).setUp() + super().setUp() self.c1 = Channel(project=self.project) self.c1.kind = "email" diff --git a/hc/api/tests/test_list_checks.py b/hc/api/tests/test_list_checks.py index e568cde0..cbfb5492 100644 --- a/hc/api/tests/test_list_checks.py +++ b/hc/api/tests/test_list_checks.py @@ -9,7 +9,7 @@ from hc.test import BaseTestCase class ListChecksTestCase(BaseTestCase): def setUp(self): - super(ListChecksTestCase, self).setUp() + super().setUp() self.now = now().replace(microsecond=0) diff --git a/hc/api/tests/test_notification_status.py b/hc/api/tests/test_notification_status.py index 9006fd54..3e311279 100644 --- a/hc/api/tests/test_notification_status.py +++ b/hc/api/tests/test_notification_status.py @@ -6,7 +6,7 @@ from hc.test import BaseTestCase class NotificationStatusTestCase(BaseTestCase): def setUp(self): - super(NotificationStatusTestCase, self).setUp() + super().setUp() self.check = Check(project=self.project, status="up") self.check.save() diff --git a/hc/api/tests/test_sendreports.py b/hc/api/tests/test_sendreports.py index bbd791fb..321276de 100644 --- a/hc/api/tests/test_sendreports.py +++ b/hc/api/tests/test_sendreports.py @@ -10,7 +10,7 @@ from hc.test import BaseTestCase class SendReportsTestCase(BaseTestCase): def setUp(self): - super(SendReportsTestCase, self).setUp() + super().setUp() # Make alice eligible for a monthly report: self.profile.next_report_date = now() - td(hours=1) diff --git a/hc/api/tests/test_update_check.py b/hc/api/tests/test_update_check.py index 68854a6c..8c7e3c52 100644 --- a/hc/api/tests/test_update_check.py +++ b/hc/api/tests/test_update_check.py @@ -8,7 +8,7 @@ from hc.test import BaseTestCase class UpdateCheckTestCase(BaseTestCase): def setUp(self): - super(UpdateCheckTestCase, self).setUp() + super().setUp() self.check = Check.objects.create(project=self.project) def post(self, code, data): diff --git a/hc/front/tests/test_add_apprise.py b/hc/front/tests/test_add_apprise.py index 2ff64668..5eabb164 100644 --- a/hc/front/tests/test_add_apprise.py +++ b/hc/front/tests/test_add_apprise.py @@ -6,7 +6,7 @@ from django.test.utils import override_settings @override_settings(APPRISE_ENABLED=True) class AddAppriseTestCase(BaseTestCase): def setUp(self): - super(AddAppriseTestCase, self).setUp() + super().setUp() self.url = "/projects/%s/add_apprise/" % self.project.code def test_instructions_work(self): diff --git a/hc/front/tests/test_add_call.py b/hc/front/tests/test_add_call.py index dc3152fd..089716e1 100644 --- a/hc/front/tests/test_add_call.py +++ b/hc/front/tests/test_add_call.py @@ -6,7 +6,7 @@ from hc.test import BaseTestCase @override_settings(TWILIO_ACCOUNT="foo", TWILIO_AUTH="foo", TWILIO_FROM="123") class AddCallTestCase(BaseTestCase): def setUp(self): - super(AddCallTestCase, self).setUp() + super().setUp() self.url = "/projects/%s/add_call/" % self.project.code def test_instructions_work(self): diff --git a/hc/front/tests/test_add_check.py b/hc/front/tests/test_add_check.py index 3cd5a6c7..7bf1ff43 100644 --- a/hc/front/tests/test_add_check.py +++ b/hc/front/tests/test_add_check.py @@ -4,7 +4,7 @@ from hc.test import BaseTestCase class AddCheckTestCase(BaseTestCase): def setUp(self): - super(AddCheckTestCase, self).setUp() + super().setUp() self.url = "/projects/%s/checks/add/" % self.project.code self.redirect_url = "/projects/%s/checks/" % self.project.code diff --git a/hc/front/tests/test_add_discord.py b/hc/front/tests/test_add_discord.py index 7c7ca29a..e128f3d3 100644 --- a/hc/front/tests/test_add_discord.py +++ b/hc/front/tests/test_add_discord.py @@ -5,7 +5,7 @@ from hc.test import BaseTestCase @override_settings(DISCORD_CLIENT_ID="t1", DISCORD_CLIENT_SECRET="s1") class AddDiscordTestCase(BaseTestCase): def setUp(self): - super(AddDiscordTestCase, self).setUp() + super().setUp() self.url = "/projects/%s/add_discord/" % self.project.code def test_instructions_work(self): diff --git a/hc/front/tests/test_add_email.py b/hc/front/tests/test_add_email.py index dc9ad8d5..5d5fc66f 100644 --- a/hc/front/tests/test_add_email.py +++ b/hc/front/tests/test_add_email.py @@ -9,7 +9,7 @@ from hc.test import BaseTestCase class AddEmailTestCase(BaseTestCase): def setUp(self): - super(AddEmailTestCase, self).setUp() + super().setUp() self.url = "/projects/%s/add_email/" % self.project.code def test_instructions_work(self): diff --git a/hc/front/tests/test_add_linenotify.py b/hc/front/tests/test_add_linenotify.py index c2b5a986..b528b4b9 100644 --- a/hc/front/tests/test_add_linenotify.py +++ b/hc/front/tests/test_add_linenotify.py @@ -5,7 +5,7 @@ from hc.test import BaseTestCase @override_settings(LINENOTIFY_CLIENT_ID="t1", LINENOTIFY_CLIENT_SECRET="s1") class AddLineNotifyTestCase(BaseTestCase): def setUp(self): - super(AddLineNotifyTestCase, self).setUp() + super().setUp() self.url = "/projects/%s/add_linenotify/" % self.project.code def test_instructions_work(self): diff --git a/hc/front/tests/test_add_matrix.py b/hc/front/tests/test_add_matrix.py index 41e7c4af..01c3aa01 100644 --- a/hc/front/tests/test_add_matrix.py +++ b/hc/front/tests/test_add_matrix.py @@ -9,7 +9,7 @@ from hc.test import BaseTestCase @override_settings(MATRIX_HOMESERVER="fake-homeserver") class AddMatrixTestCase(BaseTestCase): def setUp(self): - super(AddMatrixTestCase, self).setUp() + super().setUp() self.url = "/projects/%s/add_matrix/" % self.project.code @override_settings(MATRIX_ACCESS_TOKEN="foo") diff --git a/hc/front/tests/test_add_mattermost.py b/hc/front/tests/test_add_mattermost.py index 661b85c6..7b04e98e 100644 --- a/hc/front/tests/test_add_mattermost.py +++ b/hc/front/tests/test_add_mattermost.py @@ -4,7 +4,7 @@ from hc.test import BaseTestCase class AddMattermostTestCase(BaseTestCase): def setUp(self): - super(AddMattermostTestCase, self).setUp() + super().setUp() self.url = "/projects/%s/add_mattermost/" % self.project.code def test_instructions_work(self): diff --git a/hc/front/tests/test_add_msteams.py b/hc/front/tests/test_add_msteams.py index 9151d764..7fb9894d 100644 --- a/hc/front/tests/test_add_msteams.py +++ b/hc/front/tests/test_add_msteams.py @@ -4,7 +4,7 @@ from hc.test import BaseTestCase class AddMsTeamsTestCase(BaseTestCase): def setUp(self): - super(AddMsTeamsTestCase, self).setUp() + super().setUp() self.url = "/projects/%s/add_msteams/" % self.project.code def test_instructions_work(self): diff --git a/hc/front/tests/test_add_opsgenie.py b/hc/front/tests/test_add_opsgenie.py index 69991155..54dbf127 100644 --- a/hc/front/tests/test_add_opsgenie.py +++ b/hc/front/tests/test_add_opsgenie.py @@ -6,7 +6,7 @@ from hc.test import BaseTestCase class AddOpsGenieTestCase(BaseTestCase): def setUp(self): - super(AddOpsGenieTestCase, self).setUp() + super().setUp() self.url = "/projects/%s/add_opsgenie/" % self.project.code def test_instructions_work(self): diff --git a/hc/front/tests/test_add_pagertree.py b/hc/front/tests/test_add_pagertree.py index 0c4461db..04b61325 100644 --- a/hc/front/tests/test_add_pagertree.py +++ b/hc/front/tests/test_add_pagertree.py @@ -4,7 +4,7 @@ from hc.test import BaseTestCase class AddPagerTreeTestCase(BaseTestCase): def setUp(self): - super(AddPagerTreeTestCase, self).setUp() + super().setUp() self.url = "/projects/%s/add_pagertree/" % self.project.code def test_instructions_work(self): diff --git a/hc/front/tests/test_add_pd.py b/hc/front/tests/test_add_pd.py index c734eec7..35a10c9b 100644 --- a/hc/front/tests/test_add_pd.py +++ b/hc/front/tests/test_add_pd.py @@ -4,7 +4,7 @@ from hc.test import BaseTestCase class AddPdTestCase(BaseTestCase): def setUp(self): - super(AddPdTestCase, self).setUp() + super().setUp() self.url = "/projects/%s/add_pd/" % self.project.code def test_instructions_work(self): diff --git a/hc/front/tests/test_add_pdc.py b/hc/front/tests/test_add_pdc.py index 9036dae3..937a4b82 100644 --- a/hc/front/tests/test_add_pdc.py +++ b/hc/front/tests/test_add_pdc.py @@ -6,7 +6,7 @@ from hc.test import BaseTestCase @override_settings(PD_VENDOR_KEY="foo") class AddPdConnectTestCase(BaseTestCase): def setUp(self): - super(AddPdConnectTestCase, self).setUp() + super().setUp() self.url = "/projects/%s/add_pdc/" % self.project.code def test_it_works(self): diff --git a/hc/front/tests/test_add_pdc_complete.py b/hc/front/tests/test_add_pdc_complete.py index a765a3aa..9fa7f598 100644 --- a/hc/front/tests/test_add_pdc_complete.py +++ b/hc/front/tests/test_add_pdc_complete.py @@ -5,7 +5,7 @@ from hc.test import BaseTestCase @override_settings(PD_VENDOR_KEY="foo") class AddPdcCompleteTestCase(BaseTestCase): def setUp(self): - super(AddPdcCompleteTestCase, self).setUp() + super().setUp() self.url = "/projects/%s/add_pdc/" % self.project.code self.url += "XXXXXXXXXXXX/?service_key=123" diff --git a/hc/front/tests/test_add_pushbullet.py b/hc/front/tests/test_add_pushbullet.py index 254c241c..f6376861 100644 --- a/hc/front/tests/test_add_pushbullet.py +++ b/hc/front/tests/test_add_pushbullet.py @@ -5,7 +5,7 @@ from hc.test import BaseTestCase @override_settings(PUSHBULLET_CLIENT_ID="t1", PUSHBULLET_CLIENT_SECRET="s1") class AddPushbulletTestCase(BaseTestCase): def setUp(self): - super(AddPushbulletTestCase, self).setUp() + super().setUp() self.url = "/projects/%s/add_pushbullet/" % self.project.code def test_instructions_work(self): diff --git a/hc/front/tests/test_add_pushover.py b/hc/front/tests/test_add_pushover.py index 2540633c..266faa08 100644 --- a/hc/front/tests/test_add_pushover.py +++ b/hc/front/tests/test_add_pushover.py @@ -8,7 +8,7 @@ from hc.test import BaseTestCase ) class AddPushoverTestCase(BaseTestCase): def setUp(self): - super(AddPushoverTestCase, self).setUp() + super().setUp() self.url = "/projects/%s/add_pushover/" % self.project.code @override_settings(PUSHOVER_API_TOKEN=None) diff --git a/hc/front/tests/test_add_shell.py b/hc/front/tests/test_add_shell.py index 5c8d7136..67a604ef 100644 --- a/hc/front/tests/test_add_shell.py +++ b/hc/front/tests/test_add_shell.py @@ -6,7 +6,7 @@ from hc.test import BaseTestCase @override_settings(SHELL_ENABLED=True) class AddShellTestCase(BaseTestCase): def setUp(self): - super(AddShellTestCase, self).setUp() + super().setUp() self.url = "/projects/%s/add_shell/" % self.project.code @override_settings(SHELL_ENABLED=False) diff --git a/hc/front/tests/test_add_slack.py b/hc/front/tests/test_add_slack.py index d4832cd9..02ab92b6 100644 --- a/hc/front/tests/test_add_slack.py +++ b/hc/front/tests/test_add_slack.py @@ -4,7 +4,7 @@ from hc.test import BaseTestCase class AddSlackTestCase(BaseTestCase): def setUp(self): - super(AddSlackTestCase, self).setUp() + super().setUp() self.url = "/projects/%s/add_slack/" % self.project.code def test_instructions_work(self): diff --git a/hc/front/tests/test_add_slack_btn.py b/hc/front/tests/test_add_slack_btn.py index c7ca476d..9dc7b22d 100644 --- a/hc/front/tests/test_add_slack_btn.py +++ b/hc/front/tests/test_add_slack_btn.py @@ -5,7 +5,7 @@ from hc.test import BaseTestCase @override_settings(SLACK_CLIENT_ID="fake-client-id") class AddSlackBtnTestCase(BaseTestCase): def setUp(self): - super(AddSlackBtnTestCase, self).setUp() + super().setUp() self.url = "/projects/%s/add_slack_btn/" % self.project.code def test_instructions_work(self): diff --git a/hc/front/tests/test_add_sms.py b/hc/front/tests/test_add_sms.py index ca062820..4ecfc75d 100644 --- a/hc/front/tests/test_add_sms.py +++ b/hc/front/tests/test_add_sms.py @@ -6,7 +6,7 @@ from hc.test import BaseTestCase @override_settings(TWILIO_ACCOUNT="foo", TWILIO_AUTH="foo", TWILIO_FROM="123") class AddSmsTestCase(BaseTestCase): def setUp(self): - super(AddSmsTestCase, self).setUp() + super().setUp() self.url = "/projects/%s/add_sms/" % self.project.code def test_instructions_work(self): diff --git a/hc/front/tests/test_add_spike.py b/hc/front/tests/test_add_spike.py index aee7452b..6e174ac8 100644 --- a/hc/front/tests/test_add_spike.py +++ b/hc/front/tests/test_add_spike.py @@ -4,7 +4,7 @@ from hc.test import BaseTestCase class AddSpikeTestCase(BaseTestCase): def setUp(self): - super(AddSpikeTestCase, self).setUp() + super().setUp() self.url = "/projects/%s/add_spike/" % self.project.code def test_instructions_work(self): diff --git a/hc/front/tests/test_add_trello.py b/hc/front/tests/test_add_trello.py index 8b9544af..cb2c5ead 100644 --- a/hc/front/tests/test_add_trello.py +++ b/hc/front/tests/test_add_trello.py @@ -8,7 +8,7 @@ from hc.test import BaseTestCase @override_settings(TRELLO_APP_KEY="foo") class AddTrelloTestCase(BaseTestCase): def setUp(self): - super(AddTrelloTestCase, self).setUp() + super().setUp() self.url = "/projects/%s/add_trello/" % self.project.code def test_instructions_work(self): diff --git a/hc/front/tests/test_add_victorops.py b/hc/front/tests/test_add_victorops.py index 4bd2d662..47565cc8 100644 --- a/hc/front/tests/test_add_victorops.py +++ b/hc/front/tests/test_add_victorops.py @@ -4,7 +4,7 @@ from hc.test import BaseTestCase class AddVictorOpsTestCase(BaseTestCase): def setUp(self): - super(AddVictorOpsTestCase, self).setUp() + super().setUp() self.url = "/projects/%s/add_victorops/" % self.project.code def test_instructions_work(self): diff --git a/hc/front/tests/test_add_webhook.py b/hc/front/tests/test_add_webhook.py index 22ae851d..0d4d5630 100644 --- a/hc/front/tests/test_add_webhook.py +++ b/hc/front/tests/test_add_webhook.py @@ -4,7 +4,7 @@ from hc.test import BaseTestCase class AddWebhookTestCase(BaseTestCase): def setUp(self): - super(AddWebhookTestCase, self).setUp() + super().setUp() self.url = "/projects/%s/add_webhook/" % self.project.code def test_instructions_work(self): diff --git a/hc/front/tests/test_add_whatsapp.py b/hc/front/tests/test_add_whatsapp.py index f0225af6..2ff1ceec 100644 --- a/hc/front/tests/test_add_whatsapp.py +++ b/hc/front/tests/test_add_whatsapp.py @@ -13,7 +13,7 @@ TEST_CREDENTIALS = { @override_settings(**TEST_CREDENTIALS) class AddWhatsAppTestCase(BaseTestCase): def setUp(self): - super(AddWhatsAppTestCase, self).setUp() + super().setUp() self.url = "/projects/%s/add_whatsapp/" % self.project.code def test_instructions_work(self): diff --git a/hc/front/tests/test_add_zulip.py b/hc/front/tests/test_add_zulip.py index 20b848f5..860a5082 100644 --- a/hc/front/tests/test_add_zulip.py +++ b/hc/front/tests/test_add_zulip.py @@ -4,7 +4,7 @@ from hc.test import BaseTestCase class AddZulipTestCase(BaseTestCase): def setUp(self): - super(AddZulipTestCase, self).setUp() + super().setUp() self.url = "/projects/%s/add_zulip/" % self.project.code def test_instructions_work(self): diff --git a/hc/front/tests/test_badges.py b/hc/front/tests/test_badges.py index c79ed9c8..a073fff1 100644 --- a/hc/front/tests/test_badges.py +++ b/hc/front/tests/test_badges.py @@ -4,7 +4,7 @@ from hc.api.models import Check class BadgesTestCase(BaseTestCase): def setUp(self): - super(BadgesTestCase, self).setUp() + super().setUp() self.url = "/projects/%s/badges/" % self.project.code diff --git a/hc/front/tests/test_channel_checks.py b/hc/front/tests/test_channel_checks.py index 0caf6b32..b7ddd186 100644 --- a/hc/front/tests/test_channel_checks.py +++ b/hc/front/tests/test_channel_checks.py @@ -4,7 +4,7 @@ from hc.test import BaseTestCase class ChannelChecksTestCase(BaseTestCase): def setUp(self): - super(ChannelChecksTestCase, self).setUp() + super().setUp() self.channel = Channel(project=self.project, kind="email") self.channel.value = "alice@example.org" self.channel.save() diff --git a/hc/front/tests/test_copy.py b/hc/front/tests/test_copy.py index 602dc45d..68fbad9e 100644 --- a/hc/front/tests/test_copy.py +++ b/hc/front/tests/test_copy.py @@ -4,7 +4,7 @@ from hc.test import BaseTestCase class CopyCheckTestCase(BaseTestCase): def setUp(self): - super(CopyCheckTestCase, self).setUp() + super().setUp() self.check = Check(project=self.project) self.check.name = "Foo" self.check.subject = "success-keyword" diff --git a/hc/front/tests/test_details.py b/hc/front/tests/test_details.py index 7080c0b8..adb19a8d 100644 --- a/hc/front/tests/test_details.py +++ b/hc/front/tests/test_details.py @@ -4,7 +4,7 @@ from hc.test import BaseTestCase class DetailsTestCase(BaseTestCase): def setUp(self): - super(DetailsTestCase, self).setUp() + super().setUp() self.check = Check.objects.create(project=self.project) ping = Ping.objects.create(owner=self.check) diff --git a/hc/front/tests/test_edit_webhook.py b/hc/front/tests/test_edit_webhook.py index 9e0886c8..5bb3b0f4 100644 --- a/hc/front/tests/test_edit_webhook.py +++ b/hc/front/tests/test_edit_webhook.py @@ -6,7 +6,7 @@ from hc.test import BaseTestCase class EditWebhookTestCase(BaseTestCase): def setUp(self): - super(EditWebhookTestCase, self).setUp() + super().setUp() definition = { "method_down": "GET", diff --git a/hc/front/tests/test_filtering_rules.py b/hc/front/tests/test_filtering_rules.py index e30c3bd9..74fc690d 100644 --- a/hc/front/tests/test_filtering_rules.py +++ b/hc/front/tests/test_filtering_rules.py @@ -4,7 +4,7 @@ from hc.test import BaseTestCase class FilteringRulesTestCase(BaseTestCase): def setUp(self): - super(FilteringRulesTestCase, self).setUp() + super().setUp() self.check = Check.objects.create(project=self.project) self.url = "/checks/%s/filtering_rules/" % self.check.code diff --git a/hc/front/tests/test_log.py b/hc/front/tests/test_log.py index 23554f78..1416f8d8 100644 --- a/hc/front/tests/test_log.py +++ b/hc/front/tests/test_log.py @@ -6,7 +6,7 @@ from hc.test import BaseTestCase class LogTestCase(BaseTestCase): def setUp(self): - super(LogTestCase, self).setUp() + super().setUp() self.check = Check.objects.create(project=self.project) ping = Ping.objects.create(owner=self.check) diff --git a/hc/front/tests/test_metrics.py b/hc/front/tests/test_metrics.py index d9706960..17ee186c 100644 --- a/hc/front/tests/test_metrics.py +++ b/hc/front/tests/test_metrics.py @@ -4,7 +4,7 @@ from hc.test import BaseTestCase class MetricsTestCase(BaseTestCase): def setUp(self): - super(MetricsTestCase, self).setUp() + super().setUp() self.project.api_key_readonly = "R" * 32 self.project.save() diff --git a/hc/front/tests/test_my_checks.py b/hc/front/tests/test_my_checks.py index cb0e5c16..83f1dbfb 100644 --- a/hc/front/tests/test_my_checks.py +++ b/hc/front/tests/test_my_checks.py @@ -6,7 +6,7 @@ from django.utils import timezone class MyChecksTestCase(BaseTestCase): def setUp(self): - super(MyChecksTestCase, self).setUp() + super().setUp() self.check = Check(project=self.project, name="Alice Was Here") self.check.save() diff --git a/hc/front/tests/test_pause.py b/hc/front/tests/test_pause.py index 22c2f973..73d7593a 100644 --- a/hc/front/tests/test_pause.py +++ b/hc/front/tests/test_pause.py @@ -7,7 +7,7 @@ from hc.test import BaseTestCase class PauseTestCase(BaseTestCase): def setUp(self): - super(PauseTestCase, self).setUp() + super().setUp() self.check = Check.objects.create(project=self.project, status="up") self.url = "/checks/%s/pause/" % self.check.code self.redirect_url = "/checks/%s/details/" % self.check.code diff --git a/hc/front/tests/test_ping_details.py b/hc/front/tests/test_ping_details.py index 60f0147b..202ae892 100644 --- a/hc/front/tests/test_ping_details.py +++ b/hc/front/tests/test_ping_details.py @@ -4,7 +4,7 @@ from hc.test import BaseTestCase class PingDetailsTestCase(BaseTestCase): def setUp(self): - super(PingDetailsTestCase, self).setUp() + super().setUp() self.check = Check.objects.create(project=self.project) self.url = "/checks/%s/last_ping/" % self.check.code diff --git a/hc/front/tests/test_remove_channel.py b/hc/front/tests/test_remove_channel.py index 9db776f6..5f3cc6e6 100644 --- a/hc/front/tests/test_remove_channel.py +++ b/hc/front/tests/test_remove_channel.py @@ -4,7 +4,7 @@ from hc.test import BaseTestCase class RemoveChannelTestCase(BaseTestCase): def setUp(self): - super(RemoveChannelTestCase, self).setUp() + super().setUp() self.channel = Channel(project=self.project, kind="email") self.channel.value = "alice@example.org" self.channel.save() diff --git a/hc/front/tests/test_remove_check.py b/hc/front/tests/test_remove_check.py index 6e2b8ace..7c207221 100644 --- a/hc/front/tests/test_remove_check.py +++ b/hc/front/tests/test_remove_check.py @@ -4,7 +4,7 @@ from hc.test import BaseTestCase class RemoveCheckTestCase(BaseTestCase): def setUp(self): - super(RemoveCheckTestCase, self).setUp() + super().setUp() self.check = Check.objects.create(project=self.project) self.remove_url = "/checks/%s/remove/" % self.check.code self.redirect_url = "/projects/%s/checks/" % self.project.code diff --git a/hc/front/tests/test_resume.py b/hc/front/tests/test_resume.py index d58ae489..9debd936 100644 --- a/hc/front/tests/test_resume.py +++ b/hc/front/tests/test_resume.py @@ -4,7 +4,7 @@ from hc.test import BaseTestCase class ResumeTestCase(BaseTestCase): def setUp(self): - super(ResumeTestCase, self).setUp() + super().setUp() self.check = Check.objects.create(project=self.project, status="paused") self.url = "/checks/%s/resume/" % self.check.code self.redirect_url = "/checks/%s/details/" % self.check.code diff --git a/hc/front/tests/test_send_test_notification.py b/hc/front/tests/test_send_test_notification.py index 3e795939..df42b571 100644 --- a/hc/front/tests/test_send_test_notification.py +++ b/hc/front/tests/test_send_test_notification.py @@ -8,7 +8,7 @@ from hc.test import BaseTestCase class SendTestNotificationTestCase(BaseTestCase): def setUp(self): - super(SendTestNotificationTestCase, self).setUp() + super().setUp() self.channel = Channel(kind="email", project=self.project) self.channel.email_verified = True self.channel.value = "alice@example.org" diff --git a/hc/front/tests/test_status.py b/hc/front/tests/test_status.py index 9f84a361..1c5b1259 100644 --- a/hc/front/tests/test_status.py +++ b/hc/front/tests/test_status.py @@ -2,9 +2,9 @@ from hc.api.models import Check from hc.test import BaseTestCase -class MyChecksTestCase(BaseTestCase): +class StatusTestCase(BaseTestCase): def setUp(self): - super(MyChecksTestCase, self).setUp() + super().setUp() self.check = Check(project=self.project, name="Alice Was Here") self.check.tags = "foo" self.check.save() diff --git a/hc/front/tests/test_status_single.py b/hc/front/tests/test_status_single.py index 851d98e2..26729029 100644 --- a/hc/front/tests/test_status_single.py +++ b/hc/front/tests/test_status_single.py @@ -4,7 +4,7 @@ from hc.test import BaseTestCase class StatusSingleTestCase(BaseTestCase): def setUp(self): - super(StatusSingleTestCase, self).setUp() + super().setUp() self.check = Check(project=self.project, name="Alice Was Here") self.check.save() diff --git a/hc/front/tests/test_switch_channel.py b/hc/front/tests/test_switch_channel.py index de0f3e75..e4a64afb 100644 --- a/hc/front/tests/test_switch_channel.py +++ b/hc/front/tests/test_switch_channel.py @@ -5,7 +5,7 @@ from hc.test import BaseTestCase class SwitchChannelTestCase(BaseTestCase): def setUp(self): - super(SwitchChannelTestCase, self).setUp() + super().setUp() self.check = Check.objects.create(project=self.project) self.channel = Channel(project=self.project, kind="email") diff --git a/hc/front/tests/test_transfer.py b/hc/front/tests/test_transfer.py index 5935816e..bae2635f 100644 --- a/hc/front/tests/test_transfer.py +++ b/hc/front/tests/test_transfer.py @@ -4,7 +4,7 @@ from hc.test import BaseTestCase class TransferTestCase(BaseTestCase): def setUp(self): - super(TransferTestCase, self).setUp() + super().setUp() self.check = Check.objects.create(project=self.bobs_project) self.url = "/checks/%s/transfer/" % self.check.code diff --git a/hc/front/tests/test_unsubscribe_email.py b/hc/front/tests/test_unsubscribe_email.py index 4ec9ccf2..dfc30a8d 100644 --- a/hc/front/tests/test_unsubscribe_email.py +++ b/hc/front/tests/test_unsubscribe_email.py @@ -8,7 +8,7 @@ from hc.test import BaseTestCase class UnsubscribeEmailTestCase(BaseTestCase): def setUp(self): - super(UnsubscribeEmailTestCase, self).setUp() + super().setUp() self.channel = Channel(project=self.project, kind="email") self.channel.value = "alice@example.org" self.channel.save() diff --git a/hc/front/tests/test_update_channel.py b/hc/front/tests/test_update_channel.py index 95f8162b..d6212bab 100644 --- a/hc/front/tests/test_update_channel.py +++ b/hc/front/tests/test_update_channel.py @@ -5,7 +5,7 @@ from hc.test import BaseTestCase class UpdateChannelTestCase(BaseTestCase): def setUp(self): - super(UpdateChannelTestCase, self).setUp() + super().setUp() self.check = Check.objects.create(project=self.project) self.channel = Channel.objects.create(project=self.project, kind="email") diff --git a/hc/front/tests/test_update_channel_name.py b/hc/front/tests/test_update_channel_name.py index 2c1a20fc..d0a6f89f 100644 --- a/hc/front/tests/test_update_channel_name.py +++ b/hc/front/tests/test_update_channel_name.py @@ -4,7 +4,7 @@ from hc.test import BaseTestCase class UpdateChannelNameTestCase(BaseTestCase): def setUp(self): - super(UpdateChannelNameTestCase, self).setUp() + super().setUp() self.channel = Channel(kind="email", project=self.project) self.channel.save() diff --git a/hc/front/tests/test_update_name.py b/hc/front/tests/test_update_name.py index bd9e7677..a98b210c 100644 --- a/hc/front/tests/test_update_name.py +++ b/hc/front/tests/test_update_name.py @@ -4,7 +4,7 @@ from hc.test import BaseTestCase class UpdateNameTestCase(BaseTestCase): def setUp(self): - super(UpdateNameTestCase, self).setUp() + super().setUp() self.check = Check.objects.create(project=self.project) self.url = "/checks/%s/name/" % self.check.code diff --git a/hc/front/tests/test_update_timeout.py b/hc/front/tests/test_update_timeout.py index f8984017..81366669 100644 --- a/hc/front/tests/test_update_timeout.py +++ b/hc/front/tests/test_update_timeout.py @@ -7,7 +7,7 @@ from hc.test import BaseTestCase class UpdateTimeoutTestCase(BaseTestCase): def setUp(self): - super(UpdateTimeoutTestCase, self).setUp() + super().setUp() self.check = Check(project=self.project, status="up") self.check.last_ping = timezone.now() self.check.save() diff --git a/hc/front/tests/test_verify_email.py b/hc/front/tests/test_verify_email.py index b2fc4731..d3d483bf 100644 --- a/hc/front/tests/test_verify_email.py +++ b/hc/front/tests/test_verify_email.py @@ -4,7 +4,7 @@ from hc.test import BaseTestCase class VerifyEmailTestCase(BaseTestCase): def setUp(self): - super(VerifyEmailTestCase, self).setUp() + super().setUp() self.channel = Channel(project=self.project, kind="email") self.channel.value = "alice@example.org" self.channel.save() diff --git a/hc/payments/tests/test_billing_history.py b/hc/payments/tests/test_billing_history.py index a6f22566..9cf378c1 100644 --- a/hc/payments/tests/test_billing_history.py +++ b/hc/payments/tests/test_billing_history.py @@ -7,7 +7,7 @@ from hc.test import BaseTestCase class BillingHistoryTestCase(BaseTestCase): def setUp(self): - super(BillingHistoryTestCase, self).setUp() + super().setUp() self.sub = Subscription(user=self.alice) self.sub.subscription_id = "test-id" self.sub.customer_id = "test-customer-id" diff --git a/hc/test.py b/hc/test.py index 6de3852c..d4b97767 100644 --- a/hc/test.py +++ b/hc/test.py @@ -6,7 +6,7 @@ from hc.accounts.models import Member, Profile, Project class BaseTestCase(TestCase): def setUp(self): - super(BaseTestCase, self).setUp() + super().setUp() # Alice is a normal user for tests. Alice has team access enabled. self.alice = User(username="alice", email="alice@example.org")