Browse Source

Simplify super() calls in tests

pull/456/head
Pēteris Caune 4 years ago
parent
commit
155a1f132b
No known key found for this signature in database GPG Key ID: E28D7679E9A9EDE2
71 changed files with 73 additions and 73 deletions
  1. +1
    -1
      hc/accounts/tests/test_admin.py
  2. +1
    -1
      hc/accounts/tests/test_check_token.py
  3. +1
    -1
      hc/accounts/tests/test_login.py
  4. +1
    -1
      hc/accounts/tests/test_project.py
  5. +1
    -1
      hc/accounts/tests/test_remove_project.py
  6. +1
    -1
      hc/accounts/tests/test_senddeletionnotices.py
  7. +2
    -2
      hc/accounts/tests/test_transfer_project.py
  8. +1
    -1
      hc/api/tests/test_admin.py
  9. +1
    -1
      hc/api/tests/test_badge.py
  10. +1
    -1
      hc/api/tests/test_delete_check.py
  11. +1
    -1
      hc/api/tests/test_get_check.py
  12. +1
    -1
      hc/api/tests/test_get_flips.py
  13. +1
    -1
      hc/api/tests/test_get_pings.py
  14. +1
    -1
      hc/api/tests/test_list_channels.py
  15. +1
    -1
      hc/api/tests/test_list_checks.py
  16. +1
    -1
      hc/api/tests/test_notification_status.py
  17. +1
    -1
      hc/api/tests/test_sendreports.py
  18. +1
    -1
      hc/api/tests/test_update_check.py
  19. +1
    -1
      hc/front/tests/test_add_apprise.py
  20. +1
    -1
      hc/front/tests/test_add_call.py
  21. +1
    -1
      hc/front/tests/test_add_check.py
  22. +1
    -1
      hc/front/tests/test_add_discord.py
  23. +1
    -1
      hc/front/tests/test_add_email.py
  24. +1
    -1
      hc/front/tests/test_add_linenotify.py
  25. +1
    -1
      hc/front/tests/test_add_matrix.py
  26. +1
    -1
      hc/front/tests/test_add_mattermost.py
  27. +1
    -1
      hc/front/tests/test_add_msteams.py
  28. +1
    -1
      hc/front/tests/test_add_opsgenie.py
  29. +1
    -1
      hc/front/tests/test_add_pagertree.py
  30. +1
    -1
      hc/front/tests/test_add_pd.py
  31. +1
    -1
      hc/front/tests/test_add_pdc.py
  32. +1
    -1
      hc/front/tests/test_add_pdc_complete.py
  33. +1
    -1
      hc/front/tests/test_add_pushbullet.py
  34. +1
    -1
      hc/front/tests/test_add_pushover.py
  35. +1
    -1
      hc/front/tests/test_add_shell.py
  36. +1
    -1
      hc/front/tests/test_add_slack.py
  37. +1
    -1
      hc/front/tests/test_add_slack_btn.py
  38. +1
    -1
      hc/front/tests/test_add_sms.py
  39. +1
    -1
      hc/front/tests/test_add_spike.py
  40. +1
    -1
      hc/front/tests/test_add_trello.py
  41. +1
    -1
      hc/front/tests/test_add_victorops.py
  42. +1
    -1
      hc/front/tests/test_add_webhook.py
  43. +1
    -1
      hc/front/tests/test_add_whatsapp.py
  44. +1
    -1
      hc/front/tests/test_add_zulip.py
  45. +1
    -1
      hc/front/tests/test_badges.py
  46. +1
    -1
      hc/front/tests/test_channel_checks.py
  47. +1
    -1
      hc/front/tests/test_copy.py
  48. +1
    -1
      hc/front/tests/test_details.py
  49. +1
    -1
      hc/front/tests/test_edit_webhook.py
  50. +1
    -1
      hc/front/tests/test_filtering_rules.py
  51. +1
    -1
      hc/front/tests/test_log.py
  52. +1
    -1
      hc/front/tests/test_metrics.py
  53. +1
    -1
      hc/front/tests/test_my_checks.py
  54. +1
    -1
      hc/front/tests/test_pause.py
  55. +1
    -1
      hc/front/tests/test_ping_details.py
  56. +1
    -1
      hc/front/tests/test_remove_channel.py
  57. +1
    -1
      hc/front/tests/test_remove_check.py
  58. +1
    -1
      hc/front/tests/test_resume.py
  59. +1
    -1
      hc/front/tests/test_send_test_notification.py
  60. +2
    -2
      hc/front/tests/test_status.py
  61. +1
    -1
      hc/front/tests/test_status_single.py
  62. +1
    -1
      hc/front/tests/test_switch_channel.py
  63. +1
    -1
      hc/front/tests/test_transfer.py
  64. +1
    -1
      hc/front/tests/test_unsubscribe_email.py
  65. +1
    -1
      hc/front/tests/test_update_channel.py
  66. +1
    -1
      hc/front/tests/test_update_channel_name.py
  67. +1
    -1
      hc/front/tests/test_update_name.py
  68. +1
    -1
      hc/front/tests/test_update_timeout.py
  69. +1
    -1
      hc/front/tests/test_verify_email.py
  70. +1
    -1
      hc/payments/tests/test_billing_history.py
  71. +1
    -1
      hc/test.py

+ 1
- 1
hc/accounts/tests/test_admin.py View File

@ -3,7 +3,7 @@ from hc.test import BaseTestCase
class AccountsAdminTestCase(BaseTestCase): class AccountsAdminTestCase(BaseTestCase):
def setUp(self): def setUp(self):
super(AccountsAdminTestCase, self).setUp()
super().setUp()
self.alice.is_staff = True self.alice.is_staff = True
self.alice.is_superuser = True self.alice.is_superuser = True


+ 1
- 1
hc/accounts/tests/test_check_token.py View File

@ -4,7 +4,7 @@ from hc.test import BaseTestCase
class CheckTokenTestCase(BaseTestCase): class CheckTokenTestCase(BaseTestCase):
def setUp(self): def setUp(self):
super(CheckTokenTestCase, self).setUp()
super().setUp()
self.profile.token = make_password("secret-token", "login") self.profile.token = make_password("secret-token", "login")
self.profile.save() self.profile.save()


+ 1
- 1
hc/accounts/tests/test_login.py View File

@ -7,7 +7,7 @@ from hc.test import BaseTestCase
class LoginTestCase(BaseTestCase): class LoginTestCase(BaseTestCase):
def setUp(self): def setUp(self):
super(LoginTestCase, self).setUp()
super().setUp()
self.checks_url = "/projects/%s/checks/" % self.project.code self.checks_url = "/projects/%s/checks/" % self.project.code
def test_it_sends_link(self): def test_it_sends_link(self):


+ 1
- 1
hc/accounts/tests/test_project.py View File

@ -9,7 +9,7 @@ from hc.api.models import TokenBucket
class ProjectTestCase(BaseTestCase): class ProjectTestCase(BaseTestCase):
def setUp(self): def setUp(self):
super(ProjectTestCase, self).setUp()
super().setUp()
self.url = "/projects/%s/settings/" % self.project.code self.url = "/projects/%s/settings/" % self.project.code


+ 1
- 1
hc/accounts/tests/test_remove_project.py View File

@ -4,7 +4,7 @@ from hc.test import BaseTestCase
class RemoveProjectTestCase(BaseTestCase): class RemoveProjectTestCase(BaseTestCase):
def setUp(self): def setUp(self):
super(RemoveProjectTestCase, self).setUp()
super().setUp()
self.url = "/projects/%s/remove/" % self.project.code self.url = "/projects/%s/remove/" % self.project.code


+ 1
- 1
hc/accounts/tests/test_senddeletionnotices.py View File

@ -17,7 +17,7 @@ def counts(result):
class SendDeletionNoticesTestCase(BaseTestCase): class SendDeletionNoticesTestCase(BaseTestCase):
def setUp(self): def setUp(self):
super(SendDeletionNoticesTestCase, self).setUp()
super().setUp()
# Make alice eligible for notice -- signed up more than 1 year ago # Make alice eligible for notice -- signed up more than 1 year ago
self.alice.date_joined = now() - td(days=500) self.alice.date_joined = now() - td(days=500)


+ 2
- 2
hc/accounts/tests/test_transfer_project.py View File

@ -4,9 +4,9 @@ from hc.api.models import Check
from hc.test import BaseTestCase from hc.test import BaseTestCase
class ProjectTestCase(BaseTestCase):
class TransferProjectTestCase(BaseTestCase):
def setUp(self): def setUp(self):
super(ProjectTestCase, self).setUp()
super().setUp()
Check.objects.create(project=self.project) Check.objects.create(project=self.project)


+ 1
- 1
hc/api/tests/test_admin.py View File

@ -4,7 +4,7 @@ from hc.test import BaseTestCase
class ApiAdminTestCase(BaseTestCase): class ApiAdminTestCase(BaseTestCase):
def setUp(self): def setUp(self):
super(ApiAdminTestCase, self).setUp()
super().setUp()
self.check = Check.objects.create(project=self.project, tags="foo bar") self.check = Check.objects.create(project=self.project, tags="foo bar")
self.alice.is_staff = True self.alice.is_staff = True


+ 1
- 1
hc/api/tests/test_badge.py View File

@ -10,7 +10,7 @@ from hc.test import BaseTestCase
class BadgeTestCase(BaseTestCase): class BadgeTestCase(BaseTestCase):
def setUp(self): def setUp(self):
super(BadgeTestCase, self).setUp()
super().setUp()
self.check = Check.objects.create(project=self.project, tags="foo bar") self.check = Check.objects.create(project=self.project, tags="foo bar")
sig = base64_hmac(str(self.project.badge_key), "foo", settings.SECRET_KEY) sig = base64_hmac(str(self.project.badge_key), "foo", settings.SECRET_KEY)


+ 1
- 1
hc/api/tests/test_delete_check.py View File

@ -4,7 +4,7 @@ from hc.test import BaseTestCase
class DeleteCheckTestCase(BaseTestCase): class DeleteCheckTestCase(BaseTestCase):
def setUp(self): def setUp(self):
super(DeleteCheckTestCase, self).setUp()
super().setUp()
self.check = Check.objects.create(project=self.project) self.check = Check.objects.create(project=self.project)
def test_it_works(self): def test_it_works(self):


+ 1
- 1
hc/api/tests/test_get_check.py View File

@ -7,7 +7,7 @@ from hc.test import BaseTestCase
class GetCheckTestCase(BaseTestCase): class GetCheckTestCase(BaseTestCase):
def setUp(self): def setUp(self):
super(GetCheckTestCase, self).setUp()
super().setUp()
self.now = now().replace(microsecond=0) self.now = now().replace(microsecond=0)


+ 1
- 1
hc/api/tests/test_get_flips.py View File

@ -8,7 +8,7 @@ from hc.test import BaseTestCase
class GetFlipsTestCase(BaseTestCase): class GetFlipsTestCase(BaseTestCase):
def setUp(self): def setUp(self):
super(GetFlipsTestCase, self).setUp()
super().setUp()
self.a1 = Check(project=self.project, name="Alice 1") self.a1 = Check(project=self.project, name="Alice 1")
self.a1.timeout = td(seconds=3600) self.a1.timeout = td(seconds=3600)


+ 1
- 1
hc/api/tests/test_get_pings.py View File

@ -6,7 +6,7 @@ from hc.test import BaseTestCase
class GetPingsTestCase(BaseTestCase): class GetPingsTestCase(BaseTestCase):
def setUp(self): def setUp(self):
super(GetPingsTestCase, self).setUp()
super().setUp()
self.a1 = Check(project=self.project, name="Alice 1") self.a1 = Check(project=self.project, name="Alice 1")
self.a1.timeout = td(seconds=3600) self.a1.timeout = td(seconds=3600)


+ 1
- 1
hc/api/tests/test_list_channels.py View File

@ -6,7 +6,7 @@ from hc.test import BaseTestCase
class ListChannelsTestCase(BaseTestCase): class ListChannelsTestCase(BaseTestCase):
def setUp(self): def setUp(self):
super(ListChannelsTestCase, self).setUp()
super().setUp()
self.c1 = Channel(project=self.project) self.c1 = Channel(project=self.project)
self.c1.kind = "email" self.c1.kind = "email"


+ 1
- 1
hc/api/tests/test_list_checks.py View File

@ -9,7 +9,7 @@ from hc.test import BaseTestCase
class ListChecksTestCase(BaseTestCase): class ListChecksTestCase(BaseTestCase):
def setUp(self): def setUp(self):
super(ListChecksTestCase, self).setUp()
super().setUp()
self.now = now().replace(microsecond=0) self.now = now().replace(microsecond=0)


+ 1
- 1
hc/api/tests/test_notification_status.py View File

@ -6,7 +6,7 @@ from hc.test import BaseTestCase
class NotificationStatusTestCase(BaseTestCase): class NotificationStatusTestCase(BaseTestCase):
def setUp(self): def setUp(self):
super(NotificationStatusTestCase, self).setUp()
super().setUp()
self.check = Check(project=self.project, status="up") self.check = Check(project=self.project, status="up")
self.check.save() self.check.save()


+ 1
- 1
hc/api/tests/test_sendreports.py View File

@ -10,7 +10,7 @@ from hc.test import BaseTestCase
class SendReportsTestCase(BaseTestCase): class SendReportsTestCase(BaseTestCase):
def setUp(self): def setUp(self):
super(SendReportsTestCase, self).setUp()
super().setUp()
# Make alice eligible for a monthly report: # Make alice eligible for a monthly report:
self.profile.next_report_date = now() - td(hours=1) self.profile.next_report_date = now() - td(hours=1)


+ 1
- 1
hc/api/tests/test_update_check.py View File

@ -8,7 +8,7 @@ from hc.test import BaseTestCase
class UpdateCheckTestCase(BaseTestCase): class UpdateCheckTestCase(BaseTestCase):
def setUp(self): def setUp(self):
super(UpdateCheckTestCase, self).setUp()
super().setUp()
self.check = Check.objects.create(project=self.project) self.check = Check.objects.create(project=self.project)
def post(self, code, data): def post(self, code, data):


+ 1
- 1
hc/front/tests/test_add_apprise.py View File

@ -6,7 +6,7 @@ from django.test.utils import override_settings
@override_settings(APPRISE_ENABLED=True) @override_settings(APPRISE_ENABLED=True)
class AddAppriseTestCase(BaseTestCase): class AddAppriseTestCase(BaseTestCase):
def setUp(self): def setUp(self):
super(AddAppriseTestCase, self).setUp()
super().setUp()
self.url = "/projects/%s/add_apprise/" % self.project.code self.url = "/projects/%s/add_apprise/" % self.project.code
def test_instructions_work(self): def test_instructions_work(self):


+ 1
- 1
hc/front/tests/test_add_call.py View File

@ -6,7 +6,7 @@ from hc.test import BaseTestCase
@override_settings(TWILIO_ACCOUNT="foo", TWILIO_AUTH="foo", TWILIO_FROM="123") @override_settings(TWILIO_ACCOUNT="foo", TWILIO_AUTH="foo", TWILIO_FROM="123")
class AddCallTestCase(BaseTestCase): class AddCallTestCase(BaseTestCase):
def setUp(self): def setUp(self):
super(AddCallTestCase, self).setUp()
super().setUp()
self.url = "/projects/%s/add_call/" % self.project.code self.url = "/projects/%s/add_call/" % self.project.code
def test_instructions_work(self): def test_instructions_work(self):


+ 1
- 1
hc/front/tests/test_add_check.py View File

@ -4,7 +4,7 @@ from hc.test import BaseTestCase
class AddCheckTestCase(BaseTestCase): class AddCheckTestCase(BaseTestCase):
def setUp(self): def setUp(self):
super(AddCheckTestCase, self).setUp()
super().setUp()
self.url = "/projects/%s/checks/add/" % self.project.code self.url = "/projects/%s/checks/add/" % self.project.code
self.redirect_url = "/projects/%s/checks/" % self.project.code self.redirect_url = "/projects/%s/checks/" % self.project.code


+ 1
- 1
hc/front/tests/test_add_discord.py View File

@ -5,7 +5,7 @@ from hc.test import BaseTestCase
@override_settings(DISCORD_CLIENT_ID="t1", DISCORD_CLIENT_SECRET="s1") @override_settings(DISCORD_CLIENT_ID="t1", DISCORD_CLIENT_SECRET="s1")
class AddDiscordTestCase(BaseTestCase): class AddDiscordTestCase(BaseTestCase):
def setUp(self): def setUp(self):
super(AddDiscordTestCase, self).setUp()
super().setUp()
self.url = "/projects/%s/add_discord/" % self.project.code self.url = "/projects/%s/add_discord/" % self.project.code
def test_instructions_work(self): def test_instructions_work(self):


+ 1
- 1
hc/front/tests/test_add_email.py View File

@ -9,7 +9,7 @@ from hc.test import BaseTestCase
class AddEmailTestCase(BaseTestCase): class AddEmailTestCase(BaseTestCase):
def setUp(self): def setUp(self):
super(AddEmailTestCase, self).setUp()
super().setUp()
self.url = "/projects/%s/add_email/" % self.project.code self.url = "/projects/%s/add_email/" % self.project.code
def test_instructions_work(self): def test_instructions_work(self):


+ 1
- 1
hc/front/tests/test_add_linenotify.py View File

@ -5,7 +5,7 @@ from hc.test import BaseTestCase
@override_settings(LINENOTIFY_CLIENT_ID="t1", LINENOTIFY_CLIENT_SECRET="s1") @override_settings(LINENOTIFY_CLIENT_ID="t1", LINENOTIFY_CLIENT_SECRET="s1")
class AddLineNotifyTestCase(BaseTestCase): class AddLineNotifyTestCase(BaseTestCase):
def setUp(self): def setUp(self):
super(AddLineNotifyTestCase, self).setUp()
super().setUp()
self.url = "/projects/%s/add_linenotify/" % self.project.code self.url = "/projects/%s/add_linenotify/" % self.project.code
def test_instructions_work(self): def test_instructions_work(self):


+ 1
- 1
hc/front/tests/test_add_matrix.py View File

@ -9,7 +9,7 @@ from hc.test import BaseTestCase
@override_settings(MATRIX_HOMESERVER="fake-homeserver") @override_settings(MATRIX_HOMESERVER="fake-homeserver")
class AddMatrixTestCase(BaseTestCase): class AddMatrixTestCase(BaseTestCase):
def setUp(self): def setUp(self):
super(AddMatrixTestCase, self).setUp()
super().setUp()
self.url = "/projects/%s/add_matrix/" % self.project.code self.url = "/projects/%s/add_matrix/" % self.project.code
@override_settings(MATRIX_ACCESS_TOKEN="foo") @override_settings(MATRIX_ACCESS_TOKEN="foo")


+ 1
- 1
hc/front/tests/test_add_mattermost.py View File

@ -4,7 +4,7 @@ from hc.test import BaseTestCase
class AddMattermostTestCase(BaseTestCase): class AddMattermostTestCase(BaseTestCase):
def setUp(self): def setUp(self):
super(AddMattermostTestCase, self).setUp()
super().setUp()
self.url = "/projects/%s/add_mattermost/" % self.project.code self.url = "/projects/%s/add_mattermost/" % self.project.code
def test_instructions_work(self): def test_instructions_work(self):


+ 1
- 1
hc/front/tests/test_add_msteams.py View File

@ -4,7 +4,7 @@ from hc.test import BaseTestCase
class AddMsTeamsTestCase(BaseTestCase): class AddMsTeamsTestCase(BaseTestCase):
def setUp(self): def setUp(self):
super(AddMsTeamsTestCase, self).setUp()
super().setUp()
self.url = "/projects/%s/add_msteams/" % self.project.code self.url = "/projects/%s/add_msteams/" % self.project.code
def test_instructions_work(self): def test_instructions_work(self):


+ 1
- 1
hc/front/tests/test_add_opsgenie.py View File

@ -6,7 +6,7 @@ from hc.test import BaseTestCase
class AddOpsGenieTestCase(BaseTestCase): class AddOpsGenieTestCase(BaseTestCase):
def setUp(self): def setUp(self):
super(AddOpsGenieTestCase, self).setUp()
super().setUp()
self.url = "/projects/%s/add_opsgenie/" % self.project.code self.url = "/projects/%s/add_opsgenie/" % self.project.code
def test_instructions_work(self): def test_instructions_work(self):


+ 1
- 1
hc/front/tests/test_add_pagertree.py View File

@ -4,7 +4,7 @@ from hc.test import BaseTestCase
class AddPagerTreeTestCase(BaseTestCase): class AddPagerTreeTestCase(BaseTestCase):
def setUp(self): def setUp(self):
super(AddPagerTreeTestCase, self).setUp()
super().setUp()
self.url = "/projects/%s/add_pagertree/" % self.project.code self.url = "/projects/%s/add_pagertree/" % self.project.code
def test_instructions_work(self): def test_instructions_work(self):


+ 1
- 1
hc/front/tests/test_add_pd.py View File

@ -4,7 +4,7 @@ from hc.test import BaseTestCase
class AddPdTestCase(BaseTestCase): class AddPdTestCase(BaseTestCase):
def setUp(self): def setUp(self):
super(AddPdTestCase, self).setUp()
super().setUp()
self.url = "/projects/%s/add_pd/" % self.project.code self.url = "/projects/%s/add_pd/" % self.project.code
def test_instructions_work(self): def test_instructions_work(self):


+ 1
- 1
hc/front/tests/test_add_pdc.py View File

@ -6,7 +6,7 @@ from hc.test import BaseTestCase
@override_settings(PD_VENDOR_KEY="foo") @override_settings(PD_VENDOR_KEY="foo")
class AddPdConnectTestCase(BaseTestCase): class AddPdConnectTestCase(BaseTestCase):
def setUp(self): def setUp(self):
super(AddPdConnectTestCase, self).setUp()
super().setUp()
self.url = "/projects/%s/add_pdc/" % self.project.code self.url = "/projects/%s/add_pdc/" % self.project.code
def test_it_works(self): def test_it_works(self):


+ 1
- 1
hc/front/tests/test_add_pdc_complete.py View File

@ -5,7 +5,7 @@ from hc.test import BaseTestCase
@override_settings(PD_VENDOR_KEY="foo") @override_settings(PD_VENDOR_KEY="foo")
class AddPdcCompleteTestCase(BaseTestCase): class AddPdcCompleteTestCase(BaseTestCase):
def setUp(self): def setUp(self):
super(AddPdcCompleteTestCase, self).setUp()
super().setUp()
self.url = "/projects/%s/add_pdc/" % self.project.code self.url = "/projects/%s/add_pdc/" % self.project.code
self.url += "XXXXXXXXXXXX/?service_key=123" self.url += "XXXXXXXXXXXX/?service_key=123"


+ 1
- 1
hc/front/tests/test_add_pushbullet.py View File

@ -5,7 +5,7 @@ from hc.test import BaseTestCase
@override_settings(PUSHBULLET_CLIENT_ID="t1", PUSHBULLET_CLIENT_SECRET="s1") @override_settings(PUSHBULLET_CLIENT_ID="t1", PUSHBULLET_CLIENT_SECRET="s1")
class AddPushbulletTestCase(BaseTestCase): class AddPushbulletTestCase(BaseTestCase):
def setUp(self): def setUp(self):
super(AddPushbulletTestCase, self).setUp()
super().setUp()
self.url = "/projects/%s/add_pushbullet/" % self.project.code self.url = "/projects/%s/add_pushbullet/" % self.project.code
def test_instructions_work(self): def test_instructions_work(self):


+ 1
- 1
hc/front/tests/test_add_pushover.py View File

@ -8,7 +8,7 @@ from hc.test import BaseTestCase
) )
class AddPushoverTestCase(BaseTestCase): class AddPushoverTestCase(BaseTestCase):
def setUp(self): def setUp(self):
super(AddPushoverTestCase, self).setUp()
super().setUp()
self.url = "/projects/%s/add_pushover/" % self.project.code self.url = "/projects/%s/add_pushover/" % self.project.code
@override_settings(PUSHOVER_API_TOKEN=None) @override_settings(PUSHOVER_API_TOKEN=None)


+ 1
- 1
hc/front/tests/test_add_shell.py View File

@ -6,7 +6,7 @@ from hc.test import BaseTestCase
@override_settings(SHELL_ENABLED=True) @override_settings(SHELL_ENABLED=True)
class AddShellTestCase(BaseTestCase): class AddShellTestCase(BaseTestCase):
def setUp(self): def setUp(self):
super(AddShellTestCase, self).setUp()
super().setUp()
self.url = "/projects/%s/add_shell/" % self.project.code self.url = "/projects/%s/add_shell/" % self.project.code
@override_settings(SHELL_ENABLED=False) @override_settings(SHELL_ENABLED=False)


+ 1
- 1
hc/front/tests/test_add_slack.py View File

@ -4,7 +4,7 @@ from hc.test import BaseTestCase
class AddSlackTestCase(BaseTestCase): class AddSlackTestCase(BaseTestCase):
def setUp(self): def setUp(self):
super(AddSlackTestCase, self).setUp()
super().setUp()
self.url = "/projects/%s/add_slack/" % self.project.code self.url = "/projects/%s/add_slack/" % self.project.code
def test_instructions_work(self): def test_instructions_work(self):


+ 1
- 1
hc/front/tests/test_add_slack_btn.py View File

@ -5,7 +5,7 @@ from hc.test import BaseTestCase
@override_settings(SLACK_CLIENT_ID="fake-client-id") @override_settings(SLACK_CLIENT_ID="fake-client-id")
class AddSlackBtnTestCase(BaseTestCase): class AddSlackBtnTestCase(BaseTestCase):
def setUp(self): def setUp(self):
super(AddSlackBtnTestCase, self).setUp()
super().setUp()
self.url = "/projects/%s/add_slack_btn/" % self.project.code self.url = "/projects/%s/add_slack_btn/" % self.project.code
def test_instructions_work(self): def test_instructions_work(self):


+ 1
- 1
hc/front/tests/test_add_sms.py View File

@ -6,7 +6,7 @@ from hc.test import BaseTestCase
@override_settings(TWILIO_ACCOUNT="foo", TWILIO_AUTH="foo", TWILIO_FROM="123") @override_settings(TWILIO_ACCOUNT="foo", TWILIO_AUTH="foo", TWILIO_FROM="123")
class AddSmsTestCase(BaseTestCase): class AddSmsTestCase(BaseTestCase):
def setUp(self): def setUp(self):
super(AddSmsTestCase, self).setUp()
super().setUp()
self.url = "/projects/%s/add_sms/" % self.project.code self.url = "/projects/%s/add_sms/" % self.project.code
def test_instructions_work(self): def test_instructions_work(self):


+ 1
- 1
hc/front/tests/test_add_spike.py View File

@ -4,7 +4,7 @@ from hc.test import BaseTestCase
class AddSpikeTestCase(BaseTestCase): class AddSpikeTestCase(BaseTestCase):
def setUp(self): def setUp(self):
super(AddSpikeTestCase, self).setUp()
super().setUp()
self.url = "/projects/%s/add_spike/" % self.project.code self.url = "/projects/%s/add_spike/" % self.project.code
def test_instructions_work(self): def test_instructions_work(self):


+ 1
- 1
hc/front/tests/test_add_trello.py View File

@ -8,7 +8,7 @@ from hc.test import BaseTestCase
@override_settings(TRELLO_APP_KEY="foo") @override_settings(TRELLO_APP_KEY="foo")
class AddTrelloTestCase(BaseTestCase): class AddTrelloTestCase(BaseTestCase):
def setUp(self): def setUp(self):
super(AddTrelloTestCase, self).setUp()
super().setUp()
self.url = "/projects/%s/add_trello/" % self.project.code self.url = "/projects/%s/add_trello/" % self.project.code
def test_instructions_work(self): def test_instructions_work(self):


+ 1
- 1
hc/front/tests/test_add_victorops.py View File

@ -4,7 +4,7 @@ from hc.test import BaseTestCase
class AddVictorOpsTestCase(BaseTestCase): class AddVictorOpsTestCase(BaseTestCase):
def setUp(self): def setUp(self):
super(AddVictorOpsTestCase, self).setUp()
super().setUp()
self.url = "/projects/%s/add_victorops/" % self.project.code self.url = "/projects/%s/add_victorops/" % self.project.code
def test_instructions_work(self): def test_instructions_work(self):


+ 1
- 1
hc/front/tests/test_add_webhook.py View File

@ -4,7 +4,7 @@ from hc.test import BaseTestCase
class AddWebhookTestCase(BaseTestCase): class AddWebhookTestCase(BaseTestCase):
def setUp(self): def setUp(self):
super(AddWebhookTestCase, self).setUp()
super().setUp()
self.url = "/projects/%s/add_webhook/" % self.project.code self.url = "/projects/%s/add_webhook/" % self.project.code
def test_instructions_work(self): def test_instructions_work(self):


+ 1
- 1
hc/front/tests/test_add_whatsapp.py View File

@ -13,7 +13,7 @@ TEST_CREDENTIALS = {
@override_settings(**TEST_CREDENTIALS) @override_settings(**TEST_CREDENTIALS)
class AddWhatsAppTestCase(BaseTestCase): class AddWhatsAppTestCase(BaseTestCase):
def setUp(self): def setUp(self):
super(AddWhatsAppTestCase, self).setUp()
super().setUp()
self.url = "/projects/%s/add_whatsapp/" % self.project.code self.url = "/projects/%s/add_whatsapp/" % self.project.code
def test_instructions_work(self): def test_instructions_work(self):


+ 1
- 1
hc/front/tests/test_add_zulip.py View File

@ -4,7 +4,7 @@ from hc.test import BaseTestCase
class AddZulipTestCase(BaseTestCase): class AddZulipTestCase(BaseTestCase):
def setUp(self): def setUp(self):
super(AddZulipTestCase, self).setUp()
super().setUp()
self.url = "/projects/%s/add_zulip/" % self.project.code self.url = "/projects/%s/add_zulip/" % self.project.code
def test_instructions_work(self): def test_instructions_work(self):


+ 1
- 1
hc/front/tests/test_badges.py View File

@ -4,7 +4,7 @@ from hc.api.models import Check
class BadgesTestCase(BaseTestCase): class BadgesTestCase(BaseTestCase):
def setUp(self): def setUp(self):
super(BadgesTestCase, self).setUp()
super().setUp()
self.url = "/projects/%s/badges/" % self.project.code self.url = "/projects/%s/badges/" % self.project.code


+ 1
- 1
hc/front/tests/test_channel_checks.py View File

@ -4,7 +4,7 @@ from hc.test import BaseTestCase
class ChannelChecksTestCase(BaseTestCase): class ChannelChecksTestCase(BaseTestCase):
def setUp(self): def setUp(self):
super(ChannelChecksTestCase, self).setUp()
super().setUp()
self.channel = Channel(project=self.project, kind="email") self.channel = Channel(project=self.project, kind="email")
self.channel.value = "[email protected]" self.channel.value = "[email protected]"
self.channel.save() self.channel.save()


+ 1
- 1
hc/front/tests/test_copy.py View File

@ -4,7 +4,7 @@ from hc.test import BaseTestCase
class CopyCheckTestCase(BaseTestCase): class CopyCheckTestCase(BaseTestCase):
def setUp(self): def setUp(self):
super(CopyCheckTestCase, self).setUp()
super().setUp()
self.check = Check(project=self.project) self.check = Check(project=self.project)
self.check.name = "Foo" self.check.name = "Foo"
self.check.subject = "success-keyword" self.check.subject = "success-keyword"


+ 1
- 1
hc/front/tests/test_details.py View File

@ -4,7 +4,7 @@ from hc.test import BaseTestCase
class DetailsTestCase(BaseTestCase): class DetailsTestCase(BaseTestCase):
def setUp(self): def setUp(self):
super(DetailsTestCase, self).setUp()
super().setUp()
self.check = Check.objects.create(project=self.project) self.check = Check.objects.create(project=self.project)
ping = Ping.objects.create(owner=self.check) ping = Ping.objects.create(owner=self.check)


+ 1
- 1
hc/front/tests/test_edit_webhook.py View File

@ -6,7 +6,7 @@ from hc.test import BaseTestCase
class EditWebhookTestCase(BaseTestCase): class EditWebhookTestCase(BaseTestCase):
def setUp(self): def setUp(self):
super(EditWebhookTestCase, self).setUp()
super().setUp()
definition = { definition = {
"method_down": "GET", "method_down": "GET",


+ 1
- 1
hc/front/tests/test_filtering_rules.py View File

@ -4,7 +4,7 @@ from hc.test import BaseTestCase
class FilteringRulesTestCase(BaseTestCase): class FilteringRulesTestCase(BaseTestCase):
def setUp(self): def setUp(self):
super(FilteringRulesTestCase, self).setUp()
super().setUp()
self.check = Check.objects.create(project=self.project) self.check = Check.objects.create(project=self.project)
self.url = "/checks/%s/filtering_rules/" % self.check.code self.url = "/checks/%s/filtering_rules/" % self.check.code


+ 1
- 1
hc/front/tests/test_log.py View File

@ -6,7 +6,7 @@ from hc.test import BaseTestCase
class LogTestCase(BaseTestCase): class LogTestCase(BaseTestCase):
def setUp(self): def setUp(self):
super(LogTestCase, self).setUp()
super().setUp()
self.check = Check.objects.create(project=self.project) self.check = Check.objects.create(project=self.project)
ping = Ping.objects.create(owner=self.check) ping = Ping.objects.create(owner=self.check)


+ 1
- 1
hc/front/tests/test_metrics.py View File

@ -4,7 +4,7 @@ from hc.test import BaseTestCase
class MetricsTestCase(BaseTestCase): class MetricsTestCase(BaseTestCase):
def setUp(self): def setUp(self):
super(MetricsTestCase, self).setUp()
super().setUp()
self.project.api_key_readonly = "R" * 32 self.project.api_key_readonly = "R" * 32
self.project.save() self.project.save()


+ 1
- 1
hc/front/tests/test_my_checks.py View File

@ -6,7 +6,7 @@ from django.utils import timezone
class MyChecksTestCase(BaseTestCase): class MyChecksTestCase(BaseTestCase):
def setUp(self): def setUp(self):
super(MyChecksTestCase, self).setUp()
super().setUp()
self.check = Check(project=self.project, name="Alice Was Here") self.check = Check(project=self.project, name="Alice Was Here")
self.check.save() self.check.save()


+ 1
- 1
hc/front/tests/test_pause.py View File

@ -7,7 +7,7 @@ from hc.test import BaseTestCase
class PauseTestCase(BaseTestCase): class PauseTestCase(BaseTestCase):
def setUp(self): def setUp(self):
super(PauseTestCase, self).setUp()
super().setUp()
self.check = Check.objects.create(project=self.project, status="up") self.check = Check.objects.create(project=self.project, status="up")
self.url = "/checks/%s/pause/" % self.check.code self.url = "/checks/%s/pause/" % self.check.code
self.redirect_url = "/checks/%s/details/" % self.check.code self.redirect_url = "/checks/%s/details/" % self.check.code


+ 1
- 1
hc/front/tests/test_ping_details.py View File

@ -4,7 +4,7 @@ from hc.test import BaseTestCase
class PingDetailsTestCase(BaseTestCase): class PingDetailsTestCase(BaseTestCase):
def setUp(self): def setUp(self):
super(PingDetailsTestCase, self).setUp()
super().setUp()
self.check = Check.objects.create(project=self.project) self.check = Check.objects.create(project=self.project)
self.url = "/checks/%s/last_ping/" % self.check.code self.url = "/checks/%s/last_ping/" % self.check.code


+ 1
- 1
hc/front/tests/test_remove_channel.py View File

@ -4,7 +4,7 @@ from hc.test import BaseTestCase
class RemoveChannelTestCase(BaseTestCase): class RemoveChannelTestCase(BaseTestCase):
def setUp(self): def setUp(self):
super(RemoveChannelTestCase, self).setUp()
super().setUp()
self.channel = Channel(project=self.project, kind="email") self.channel = Channel(project=self.project, kind="email")
self.channel.value = "[email protected]" self.channel.value = "[email protected]"
self.channel.save() self.channel.save()


+ 1
- 1
hc/front/tests/test_remove_check.py View File

@ -4,7 +4,7 @@ from hc.test import BaseTestCase
class RemoveCheckTestCase(BaseTestCase): class RemoveCheckTestCase(BaseTestCase):
def setUp(self): def setUp(self):
super(RemoveCheckTestCase, self).setUp()
super().setUp()
self.check = Check.objects.create(project=self.project) self.check = Check.objects.create(project=self.project)
self.remove_url = "/checks/%s/remove/" % self.check.code self.remove_url = "/checks/%s/remove/" % self.check.code
self.redirect_url = "/projects/%s/checks/" % self.project.code self.redirect_url = "/projects/%s/checks/" % self.project.code


+ 1
- 1
hc/front/tests/test_resume.py View File

@ -4,7 +4,7 @@ from hc.test import BaseTestCase
class ResumeTestCase(BaseTestCase): class ResumeTestCase(BaseTestCase):
def setUp(self): def setUp(self):
super(ResumeTestCase, self).setUp()
super().setUp()
self.check = Check.objects.create(project=self.project, status="paused") self.check = Check.objects.create(project=self.project, status="paused")
self.url = "/checks/%s/resume/" % self.check.code self.url = "/checks/%s/resume/" % self.check.code
self.redirect_url = "/checks/%s/details/" % self.check.code self.redirect_url = "/checks/%s/details/" % self.check.code


+ 1
- 1
hc/front/tests/test_send_test_notification.py View File

@ -8,7 +8,7 @@ from hc.test import BaseTestCase
class SendTestNotificationTestCase(BaseTestCase): class SendTestNotificationTestCase(BaseTestCase):
def setUp(self): def setUp(self):
super(SendTestNotificationTestCase, self).setUp()
super().setUp()
self.channel = Channel(kind="email", project=self.project) self.channel = Channel(kind="email", project=self.project)
self.channel.email_verified = True self.channel.email_verified = True
self.channel.value = "[email protected]" self.channel.value = "[email protected]"


+ 2
- 2
hc/front/tests/test_status.py View File

@ -2,9 +2,9 @@ from hc.api.models import Check
from hc.test import BaseTestCase from hc.test import BaseTestCase
class MyChecksTestCase(BaseTestCase):
class StatusTestCase(BaseTestCase):
def setUp(self): def setUp(self):
super(MyChecksTestCase, self).setUp()
super().setUp()
self.check = Check(project=self.project, name="Alice Was Here") self.check = Check(project=self.project, name="Alice Was Here")
self.check.tags = "foo" self.check.tags = "foo"
self.check.save() self.check.save()


+ 1
- 1
hc/front/tests/test_status_single.py View File

@ -4,7 +4,7 @@ from hc.test import BaseTestCase
class StatusSingleTestCase(BaseTestCase): class StatusSingleTestCase(BaseTestCase):
def setUp(self): def setUp(self):
super(StatusSingleTestCase, self).setUp()
super().setUp()
self.check = Check(project=self.project, name="Alice Was Here") self.check = Check(project=self.project, name="Alice Was Here")
self.check.save() self.check.save()


+ 1
- 1
hc/front/tests/test_switch_channel.py View File

@ -5,7 +5,7 @@ from hc.test import BaseTestCase
class SwitchChannelTestCase(BaseTestCase): class SwitchChannelTestCase(BaseTestCase):
def setUp(self): def setUp(self):
super(SwitchChannelTestCase, self).setUp()
super().setUp()
self.check = Check.objects.create(project=self.project) self.check = Check.objects.create(project=self.project)
self.channel = Channel(project=self.project, kind="email") self.channel = Channel(project=self.project, kind="email")


+ 1
- 1
hc/front/tests/test_transfer.py View File

@ -4,7 +4,7 @@ from hc.test import BaseTestCase
class TransferTestCase(BaseTestCase): class TransferTestCase(BaseTestCase):
def setUp(self): def setUp(self):
super(TransferTestCase, self).setUp()
super().setUp()
self.check = Check.objects.create(project=self.bobs_project) self.check = Check.objects.create(project=self.bobs_project)
self.url = "/checks/%s/transfer/" % self.check.code self.url = "/checks/%s/transfer/" % self.check.code


+ 1
- 1
hc/front/tests/test_unsubscribe_email.py View File

@ -8,7 +8,7 @@ from hc.test import BaseTestCase
class UnsubscribeEmailTestCase(BaseTestCase): class UnsubscribeEmailTestCase(BaseTestCase):
def setUp(self): def setUp(self):
super(UnsubscribeEmailTestCase, self).setUp()
super().setUp()
self.channel = Channel(project=self.project, kind="email") self.channel = Channel(project=self.project, kind="email")
self.channel.value = "[email protected]" self.channel.value = "[email protected]"
self.channel.save() self.channel.save()


+ 1
- 1
hc/front/tests/test_update_channel.py View File

@ -5,7 +5,7 @@ from hc.test import BaseTestCase
class UpdateChannelTestCase(BaseTestCase): class UpdateChannelTestCase(BaseTestCase):
def setUp(self): def setUp(self):
super(UpdateChannelTestCase, self).setUp()
super().setUp()
self.check = Check.objects.create(project=self.project) self.check = Check.objects.create(project=self.project)
self.channel = Channel.objects.create(project=self.project, kind="email") self.channel = Channel.objects.create(project=self.project, kind="email")


+ 1
- 1
hc/front/tests/test_update_channel_name.py View File

@ -4,7 +4,7 @@ from hc.test import BaseTestCase
class UpdateChannelNameTestCase(BaseTestCase): class UpdateChannelNameTestCase(BaseTestCase):
def setUp(self): def setUp(self):
super(UpdateChannelNameTestCase, self).setUp()
super().setUp()
self.channel = Channel(kind="email", project=self.project) self.channel = Channel(kind="email", project=self.project)
self.channel.save() self.channel.save()


+ 1
- 1
hc/front/tests/test_update_name.py View File

@ -4,7 +4,7 @@ from hc.test import BaseTestCase
class UpdateNameTestCase(BaseTestCase): class UpdateNameTestCase(BaseTestCase):
def setUp(self): def setUp(self):
super(UpdateNameTestCase, self).setUp()
super().setUp()
self.check = Check.objects.create(project=self.project) self.check = Check.objects.create(project=self.project)
self.url = "/checks/%s/name/" % self.check.code self.url = "/checks/%s/name/" % self.check.code


+ 1
- 1
hc/front/tests/test_update_timeout.py View File

@ -7,7 +7,7 @@ from hc.test import BaseTestCase
class UpdateTimeoutTestCase(BaseTestCase): class UpdateTimeoutTestCase(BaseTestCase):
def setUp(self): def setUp(self):
super(UpdateTimeoutTestCase, self).setUp()
super().setUp()
self.check = Check(project=self.project, status="up") self.check = Check(project=self.project, status="up")
self.check.last_ping = timezone.now() self.check.last_ping = timezone.now()
self.check.save() self.check.save()


+ 1
- 1
hc/front/tests/test_verify_email.py View File

@ -4,7 +4,7 @@ from hc.test import BaseTestCase
class VerifyEmailTestCase(BaseTestCase): class VerifyEmailTestCase(BaseTestCase):
def setUp(self): def setUp(self):
super(VerifyEmailTestCase, self).setUp()
super().setUp()
self.channel = Channel(project=self.project, kind="email") self.channel = Channel(project=self.project, kind="email")
self.channel.value = "[email protected]" self.channel.value = "[email protected]"
self.channel.save() self.channel.save()


+ 1
- 1
hc/payments/tests/test_billing_history.py View File

@ -7,7 +7,7 @@ from hc.test import BaseTestCase
class BillingHistoryTestCase(BaseTestCase): class BillingHistoryTestCase(BaseTestCase):
def setUp(self): def setUp(self):
super(BillingHistoryTestCase, self).setUp()
super().setUp()
self.sub = Subscription(user=self.alice) self.sub = Subscription(user=self.alice)
self.sub.subscription_id = "test-id" self.sub.subscription_id = "test-id"
self.sub.customer_id = "test-customer-id" self.sub.customer_id = "test-customer-id"


+ 1
- 1
hc/test.py View File

@ -6,7 +6,7 @@ from hc.accounts.models import Member, Profile, Project
class BaseTestCase(TestCase): class BaseTestCase(TestCase):
def setUp(self): def setUp(self):
super(BaseTestCase, self).setUp()
super().setUp()
# Alice is a normal user for tests. Alice has team access enabled. # Alice is a normal user for tests. Alice has team access enabled.
self.alice = User(username="alice", email="[email protected]") self.alice = User(username="alice", email="[email protected]")


Loading…
Cancel
Save