Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

webhook: Rename FIXTURE_DIR_NAME to WEBHOOK_DIR_NAME.

PIG2085ecbfecd77f4
diff --git a/zerver/lib/test_classes.py b/zerver/lib/test_classes.py
index cc51f812360..04e004bac7c 100644
--- a/zerver/lib/test_classes.py
+++ b/zerver/lib/test_classes.py
@@ -1374,7 +1374,7 @@ class WebhookTestCase(ZulipTestCase):
STREAM_NAME: Optional[str] = None
TEST_USER_EMAIL = "[email protected]"
URL_TEMPLATE: str
- FIXTURE_DIR_NAME: Optional[str] = None
+ WEBHOOK_DIR_NAME: Optional[str] = None
@property
def test_user(self) -> UserProfile:
@@ -1420,8 +1420,8 @@ class WebhookTestCase(ZulipTestCase):
payload = self.get_payload(fixture_name)
if content_type is not None:
kwargs["content_type"] = content_type
- if self.FIXTURE_DIR_NAME is not None:
- headers = get_fixture_http_headers(self.FIXTURE_DIR_NAME, fixture_name)
+ if self.WEBHOOK_DIR_NAME is not None:
+ headers = get_fixture_http_headers(self.WEBHOOK_DIR_NAME, fixture_name)
headers = standardize_headers(headers)
kwargs.update(headers)
@@ -1467,8 +1467,8 @@ class WebhookTestCase(ZulipTestCase):
payload = self.get_payload(fixture_name)
kwargs["content_type"] = content_type
- if self.FIXTURE_DIR_NAME is not None:
- headers = get_fixture_http_headers(self.FIXTURE_DIR_NAME, fixture_name)
+ if self.WEBHOOK_DIR_NAME is not None:
+ headers = get_fixture_http_headers(self.WEBHOOK_DIR_NAME, fixture_name)
headers = standardize_headers(headers)
kwargs.update(headers)
# The sender profile shouldn't be passed any further in kwargs, so we pop it.
@@ -1512,8 +1512,8 @@ class WebhookTestCase(ZulipTestCase):
return self.get_body(fixture_name)
def get_body(self, fixture_name: str) -> str:
- assert self.FIXTURE_DIR_NAME is not None
- body = self.webhook_fixture_data(self.FIXTURE_DIR_NAME, fixture_name)
+ assert self.WEBHOOK_DIR_NAME is not None
+ body = self.webhook_fixture_data(self.WEBHOOK_DIR_NAME, fixture_name)
# fail fast if we don't have valid json
orjson.loads(body)
return body
diff --git a/zerver/webhooks/airbrake/tests.py b/zerver/webhooks/airbrake/tests.py
index 44e0272fcb8..a01db9e731d 100644
--- a/zerver/webhooks/airbrake/tests.py
+++ b/zerver/webhooks/airbrake/tests.py
@@ -4,7 +4,7 @@ from zerver.lib.test_classes import WebhookTestCase
class AirbrakeHookTests(WebhookTestCase):
STREAM_NAME = "airbrake"
URL_TEMPLATE = "/api/v1/external/airbrake?stream={stream}&api_key={api_key}"
- FIXTURE_DIR_NAME = "airbrake"
+ WEBHOOK_DIR_NAME = "airbrake"
def test_airbrake_error_message(self) -> None:
expected_topic = "ZulipIntegrationTest"
diff --git a/zerver/webhooks/alertmanager/tests.py b/zerver/webhooks/alertmanager/tests.py
index 358580988d8..e0bb2065455 100644
--- a/zerver/webhooks/alertmanager/tests.py
+++ b/zerver/webhooks/alertmanager/tests.py
@@ -4,7 +4,7 @@ from zerver.lib.test_classes import WebhookTestCase
class AlertmanagerHookTests(WebhookTestCase):
STREAM_NAME = "alertmanager"
URL_TEMPLATE = "/api/v1/external/alertmanager?&api_key={api_key}&stream={stream}&name=topic&desc=description"
- FIXTURE_DIR_NAME = "alertmanager"
+ WEBHOOK_DIR_NAME = "alertmanager"
def test_error_issue_message(self) -> None:
expected_topic = "andromeda"
diff --git a/zerver/webhooks/ansibletower/tests.py b/zerver/webhooks/ansibletower/tests.py
index 9a082613546..c29beaf6074 100644
--- a/zerver/webhooks/ansibletower/tests.py
+++ b/zerver/webhooks/ansibletower/tests.py
@@ -4,7 +4,7 @@ from zerver.lib.test_classes import WebhookTestCase
class AnsibletowerHookTests(WebhookTestCase):
STREAM_NAME = "ansibletower"
URL_TEMPLATE = "/api/v1/external/ansibletower?api_key={api_key}&stream={stream}"
- FIXTURE_DIR_NAME = "ansibletower"
+ WEBHOOK_DIR_NAME = "ansibletower"
def test_ansibletower_project_update_successful_message(self) -> None:
"""
diff --git a/zerver/webhooks/appfollow/tests.py b/zerver/webhooks/appfollow/tests.py
index 026b875bdcc..6d0485088e5 100644
--- a/zerver/webhooks/appfollow/tests.py
+++ b/zerver/webhooks/appfollow/tests.py
@@ -5,7 +5,7 @@ from zerver.webhooks.appfollow.view import convert_markdown
class AppFollowHookTests(WebhookTestCase):
STREAM_NAME = "appfollow"
URL_TEMPLATE = "/api/v1/external/appfollow?stream={stream}&api_key={api_key}"
- FIXTURE_DIR_NAME = "appfollow"
+ WEBHOOK_DIR_NAME = "appfollow"
def test_sample(self) -> None:
expected_topic = "Webhook integration was successful."
diff --git a/zerver/webhooks/appveyor/tests.py b/zerver/webhooks/appveyor/tests.py
index 258edf22f85..0d8b4d184e1 100644
--- a/zerver/webhooks/appveyor/tests.py
+++ b/zerver/webhooks/appveyor/tests.py
@@ -4,7 +4,7 @@ from zerver.lib.test_classes import WebhookTestCase
class AppveyorHookTests(WebhookTestCase):
STREAM_NAME = "appveyor"
URL_TEMPLATE = "/api/v1/external/appveyor?api_key={api_key}&stream={stream}"
- FIXTURE_DIR_NAME = "appveyor"
+ WEBHOOK_DIR_NAME = "appveyor"
def test_appveyor_build_success_message(self) -> None:
"""
diff --git a/zerver/webhooks/basecamp/tests.py b/zerver/webhooks/basecamp/tests.py
index 1a306050302..685bffed06d 100644
--- a/zerver/webhooks/basecamp/tests.py
+++ b/zerver/webhooks/basecamp/tests.py
@@ -6,7 +6,7 @@ TOPIC = "Zulip HQ"
class BasecampHookTests(WebhookTestCase):
STREAM_NAME = "basecamp"
URL_TEMPLATE = "/api/v1/external/basecamp?stream={stream}&api_key={api_key}"
- FIXTURE_DIR_NAME = "basecamp"
+ WEBHOOK_DIR_NAME = "basecamp"
def test_basecamp_makes_doc_active(self) -> None:
expected_message = "Tomasz activated the document [New doc](https://3.basecamp.com/3688623/buckets/2957043/documents/432522214)."
diff --git a/zerver/webhooks/beeminder/tests.py b/zerver/webhooks/beeminder/tests.py
index 29c3246dfc9..e44290776bc 100644
--- a/zerver/webhooks/beeminder/tests.py
+++ b/zerver/webhooks/beeminder/tests.py
@@ -7,7 +7,7 @@ from zerver.lib.test_classes import WebhookTestCase
class BeeminderHookTests(WebhookTestCase):
STREAM_NAME = "beeminder"
URL_TEMPLATE = "/api/v1/external/beeminder?api_key={api_key}&stream={stream}"
- FIXTURE_DIR_NAME = "beeminder"
+ WEBHOOK_DIR_NAME = "beeminder"
@patch("zerver.webhooks.beeminder.view.time.time")
def test_beeminder_derail(self, time: Any) -> None:
diff --git a/zerver/webhooks/bitbucket/tests.py b/zerver/webhooks/bitbucket/tests.py
index 71f6c8df5ee..c6fb0e26a94 100644
--- a/zerver/webhooks/bitbucket/tests.py
+++ b/zerver/webhooks/bitbucket/tests.py
@@ -9,7 +9,7 @@ TOPIC_BRANCH_EVENTS = "Repository name / master"
class BitbucketHookTests(WebhookTestCase):
STREAM_NAME = "bitbucket"
URL_TEMPLATE = "/api/v1/external/bitbucket?stream={stream}"
- FIXTURE_DIR_NAME = "bitbucket"
+ WEBHOOK_DIR_NAME = "bitbucket"
def test_bitbucket_on_push_event(self) -> None:
fixture_name = "push"
diff --git a/zerver/webhooks/bitbucket2/tests.py b/zerver/webhooks/bitbucket2/tests.py
index f4712a02f62..d677c399123 100644
--- a/zerver/webhooks/bitbucket2/tests.py
+++ b/zerver/webhooks/bitbucket2/tests.py
@@ -12,7 +12,7 @@ TOPIC_BRANCH_EVENTS = "Repository name / master"
class Bitbucket2HookTests(WebhookTestCase):
STREAM_NAME = "bitbucket2"
URL_TEMPLATE = "/api/v1/external/bitbucket2?stream={stream}&api_key={api_key}"
- FIXTURE_DIR_NAME = "bitbucket2"
+ WEBHOOK_DIR_NAME = "bitbucket2"
def test_bitbucket2_on_push_event(self) -> None:
commit_info = "* first commit ([84b96ad](https://bitbucket.org/kolaszek/repository-name/commits/84b96adc644a30fd6465b3d196369d880762afed))"
diff --git a/zerver/webhooks/bitbucket3/tests.py b/zerver/webhooks/bitbucket3/tests.py
index 3f4529b5b36..e020d1ff135 100644
--- a/zerver/webhooks/bitbucket3/tests.py
+++ b/zerver/webhooks/bitbucket3/tests.py
@@ -7,7 +7,7 @@ TOPIC_BRANCH_EVENTS = "sandbox / {branch}"
class Bitbucket3HookTests(WebhookTestCase):
STREAM_NAME = "bitbucket3"
URL_TEMPLATE = "/api/v1/external/bitbucket3?stream={stream}&api_key={api_key}"
- FIXTURE_DIR_NAME = "bitbucket3"
+ WEBHOOK_DIR_NAME = "bitbucket3"
# Diagnostics events:
def test_ping(self) -> None:
diff --git a/zerver/webhooks/buildbot/tests.py b/zerver/webhooks/buildbot/tests.py
index f7592656a56..b38b1531345 100644
--- a/zerver/webhooks/buildbot/tests.py
+++ b/zerver/webhooks/buildbot/tests.py
@@ -4,7 +4,7 @@ from zerver.lib.test_classes import WebhookTestCase
class BuildbotHookTests(WebhookTestCase):
STREAM_NAME = "buildbot"
URL_TEMPLATE = "/api/v1/external/buildbot?api_key={api_key}&stream={stream}"
- FIXTURE_DIR_NAME = "buildbot"
+ WEBHOOK_DIR_NAME = "buildbot"
def test_build_started(self) -> None:
expected_topic = "buildbot-hello"
diff --git a/zerver/webhooks/canarytoken/tests.py b/zerver/webhooks/canarytoken/tests.py
index dfed43f498c..7b9b4515426 100644
--- a/zerver/webhooks/canarytoken/tests.py
+++ b/zerver/webhooks/canarytoken/tests.py
@@ -4,7 +4,7 @@ from zerver.lib.test_classes import WebhookTestCase
class CanarytokenHookTests(WebhookTestCase):
STREAM_NAME = "canarytoken"
URL_TEMPLATE = "/api/v1/external/canarytoken?stream={stream}&api_key={api_key}"
- FIXTURE_DIR_NAME = "canarytoken"
+ WEBHOOK_DIR_NAME = "canarytoken"
def test_canarytoken_new(self) -> None:
expected_message = (
diff --git a/zerver/webhooks/circleci/tests.py b/zerver/webhooks/circleci/tests.py
index 7e91fd5bfb4..87e8320c473 100644
--- a/zerver/webhooks/circleci/tests.py
+++ b/zerver/webhooks/circleci/tests.py
@@ -4,7 +4,7 @@ from zerver.lib.test_classes import WebhookTestCase
class CircleCiHookTests(WebhookTestCase):
STREAM_NAME = "circleci"
URL_TEMPLATE = "/api/v1/external/circleci?stream={stream}&api_key={api_key}"
- FIXTURE_DIR_NAME = "circleci"
+ WEBHOOK_DIR_NAME = "circleci"
def test_private_repo_with_pull_request_off_bitbucket(self) -> None:
expected_topic = "circleci-test"
diff --git a/zerver/webhooks/clubhouse/tests.py b/zerver/webhooks/clubhouse/tests.py
index d0583d72e3e..755bbb061f9 100644
--- a/zerver/webhooks/clubhouse/tests.py
+++ b/zerver/webhooks/clubhouse/tests.py
@@ -7,7 +7,7 @@ from zerver.lib.test_classes import WebhookTestCase
class ClubhouseWebhookTest(WebhookTestCase):
STREAM_NAME = "clubhouse"
URL_TEMPLATE = "/api/v1/external/clubhouse?stream={stream}&api_key={api_key}"
- FIXTURE_DIR_NAME = "clubhouse"
+ WEBHOOK_DIR_NAME = "clubhouse"
def test_story_create(self) -> None:
expected_message = "New story [Add cool feature!](https://app.clubhouse.io/zulip/story/11) of type **feature** was created."
diff --git a/zerver/webhooks/codeship/tests.py b/zerver/webhooks/codeship/tests.py
index ea6ede58674..ff09f74981a 100644
--- a/zerver/webhooks/codeship/tests.py
+++ b/zerver/webhooks/codeship/tests.py
@@ -5,7 +5,7 @@ class CodeshipHookTests(WebhookTestCase):
STREAM_NAME = "codeship"
URL_TEMPLATE = "/api/v1/external/codeship?stream={stream}&api_key={api_key}"
TOPIC = "codeship/docs"
- FIXTURE_DIR_NAME = "codeship"
+ WEBHOOK_DIR_NAME = "codeship"
def test_codeship_build_in_testing_status_message(self) -> None:
"""
diff --git a/zerver/webhooks/crashlytics/tests.py b/zerver/webhooks/crashlytics/tests.py
index 50fa3ace321..6b7b4a88558 100644
--- a/zerver/webhooks/crashlytics/tests.py
+++ b/zerver/webhooks/crashlytics/tests.py
@@ -4,7 +4,7 @@ from zerver.lib.test_classes import WebhookTestCase
class CrashlyticsHookTests(WebhookTestCase):
STREAM_NAME = "crashlytics"
URL_TEMPLATE = "/api/v1/external/crashlytics?stream={stream}&api_key={api_key}"
- FIXTURE_DIR_NAME = "crashlytics"
+ WEBHOOK_DIR_NAME = "crashlytics"
def test_crashlytics_verification_message(self) -> None:
expected_topic = "Setup"
diff --git a/zerver/webhooks/delighted/tests.py b/zerver/webhooks/delighted/tests.py
index 643376ee833..3e77179fd43 100644
--- a/zerver/webhooks/delighted/tests.py
+++ b/zerver/webhooks/delighted/tests.py
@@ -4,7 +4,7 @@ from zerver.lib.test_classes import WebhookTestCase
class DelightedHookTests(WebhookTestCase):
STREAM_NAME = "delighted"
URL_TEMPLATE = "/api/v1/external/delighted?stream={stream}&api_key={api_key}"
- FIXTURE_DIR_NAME = "delighted"
+ WEBHOOK_DIR_NAME = "delighted"
def test_feedback_message_promoter(self) -> None:
expected_topic = "Survey response"
diff --git a/zerver/webhooks/deskdotcom/tests.py b/zerver/webhooks/deskdotcom/tests.py
index 63277b971d3..11c6491be2b 100644
--- a/zerver/webhooks/deskdotcom/tests.py
+++ b/zerver/webhooks/deskdotcom/tests.py
@@ -14,7 +14,7 @@ from zerver.lib.test_classes import WebhookTestCase
class DeskDotComHookTests(WebhookTestCase):
STREAM_NAME = "deskdotcom"
URL_TEMPLATE = "/api/v1/external/deskdotcom?stream={stream}"
- FIXTURE_DIR_NAME = "deskdotcom"
+ WEBHOOK_DIR_NAME = "deskdotcom"
def test_static_text_message(self) -> None:
diff --git a/zerver/webhooks/dialogflow/tests.py b/zerver/webhooks/dialogflow/tests.py
index 1106da45576..45b33dbc885 100644
--- a/zerver/webhooks/dialogflow/tests.py
+++ b/zerver/webhooks/dialogflow/tests.py
@@ -3,7 +3,7 @@ from zerver.lib.test_classes import WebhookTestCase
class DialogflowHookTests(WebhookTestCase):
URL_TEMPLATE = "/api/v1/external/dialogflow?api_key={api_key}&[email protected]"
- FIXTURE_DIR_NAME = "dialogflow"
+ WEBHOOK_DIR_NAME = "dialogflow"
def test_dialogflow_default(self) -> None:
email = self.example_user("aaron").email
diff --git a/zerver/webhooks/dropbox/tests.py b/zerver/webhooks/dropbox/tests.py
index 29334ec0fab..44f2eb4254f 100644
--- a/zerver/webhooks/dropbox/tests.py
+++ b/zerver/webhooks/dropbox/tests.py
@@ -5,7 +5,7 @@ from zerver.lib.users import get_api_key
class DropboxHookTests(WebhookTestCase):
STREAM_NAME = "test"
URL_TEMPLATE = "/api/v1/external/dropbox?&api_key={api_key}&stream={stream}"
- FIXTURE_DIR_NAME = "dropbox"
+ WEBHOOK_DIR_NAME = "dropbox"
def test_file_updated(self) -> None:
expected_topic = "Dropbox"
diff --git a/zerver/webhooks/errbit/tests.py b/zerver/webhooks/errbit/tests.py
index 9b9cc591f40..78f8f1586d9 100644
--- a/zerver/webhooks/errbit/tests.py
+++ b/zerver/webhooks/errbit/tests.py
@@ -4,7 +4,7 @@ from zerver.lib.test_classes import WebhookTestCase
class ErrBitHookTests(WebhookTestCase):
STREAM_NAME = "errbit"
URL_TEMPLATE = "/api/v1/external/errbit?stream={stream}&api_key={api_key}"
- FIXTURE_DIR_NAME = "errbit"
+ WEBHOOK_DIR_NAME = "errbit"
def test_errbit_error_message(self) -> None:
expected_topic = "ZulipIntegrationTest / ErrbitEnvName"
diff --git a/zerver/webhooks/flock/tests.py b/zerver/webhooks/flock/tests.py
index 78be2480dfc..9fe219f8050 100644
--- a/zerver/webhooks/flock/tests.py
+++ b/zerver/webhooks/flock/tests.py
@@ -4,7 +4,7 @@ from zerver.lib.test_classes import WebhookTestCase
class FlockHookTests(WebhookTestCase):
STREAM_NAME = "test"
URL_TEMPLATE = "/api/v1/external/flock?api_key={api_key}&stream={stream}"
- FIXTURE_DIR_NAME = "flock"
+ WEBHOOK_DIR_NAME = "flock"
def test_flock_message(self) -> None:
expected_topic = "Flock notifications"
diff --git a/zerver/webhooks/freshdesk/tests.py b/zerver/webhooks/freshdesk/tests.py
index 77c1944c471..17628a96709 100644
--- a/zerver/webhooks/freshdesk/tests.py
+++ b/zerver/webhooks/freshdesk/tests.py
@@ -6,7 +6,7 @@ from zerver.lib.test_classes import WebhookTestCase
class FreshdeskHookTests(WebhookTestCase):
STREAM_NAME = "freshdesk"
URL_TEMPLATE = "/api/v1/external/freshdesk?stream={stream}"
- FIXTURE_DIR_NAME = "freshdesk"
+ WEBHOOK_DIR_NAME = "freshdesk"
def test_ticket_creation(self) -> None:
"""
diff --git a/zerver/webhooks/freshping/tests.py b/zerver/webhooks/freshping/tests.py
index 5a0ce2774a8..788122fbcc5 100644
--- a/zerver/webhooks/freshping/tests.py
+++ b/zerver/webhooks/freshping/tests.py
@@ -4,7 +4,7 @@ from zerver.lib.test_classes import WebhookTestCase
class FreshpingHookTests(WebhookTestCase):
STREAM_NAME = "freshping"
URL_TEMPLATE = "/api/v1/external/freshping?api_key={api_key}&stream={stream}"
- FIXTURE_DIR_NAME = "freshping"
+ WEBHOOK_DIR_NAME = "freshping"
def test_freshping_check_test(self) -> None:
"""
diff --git a/zerver/webhooks/freshstatus/tests.py b/zerver/webhooks/freshstatus/tests.py
index 93182b2a759..a4fd29e04e9 100644
--- a/zerver/webhooks/freshstatus/tests.py
+++ b/zerver/webhooks/freshstatus/tests.py
@@ -7,7 +7,7 @@ from zerver.webhooks.freshstatus.view import MISCONFIGURED_PAYLOAD_ERROR_MESSAGE
class FreshstatusHookTests(WebhookTestCase):
STREAM_NAME = "freshstatus"
URL_TEMPLATE = "/api/v1/external/freshstatus?api_key={api_key}&stream={stream}"
- FIXTURE_DIR_NAME = "freshstatus"
+ WEBHOOK_DIR_NAME = "freshstatus"
def test_freshstatus_incident_open_multiple_services(self) -> None:
"""
diff --git a/zerver/webhooks/front/tests.py b/zerver/webhooks/front/tests.py
index 15876c084ea..a94ca775d9b 100644
--- a/zerver/webhooks/front/tests.py
+++ b/zerver/webhooks/front/tests.py
@@ -6,7 +6,7 @@ from zerver.lib.test_classes import WebhookTestCase
class FrontHookTests(WebhookTestCase):
STREAM_NAME = "front"
URL_TEMPLATE = "/api/v1/external/front?&api_key={api_key}&stream={stream}"
- FIXTURE_DIR_NAME = "front"
+ WEBHOOK_DIR_NAME = "front"
# Scenario 1: Conversation starts from an outbound message.
diff --git a/zerver/webhooks/gci/tests.py b/zerver/webhooks/gci/tests.py
index 2079129b323..6e808444948 100644
--- a/zerver/webhooks/gci/tests.py
+++ b/zerver/webhooks/gci/tests.py
@@ -4,7 +4,7 @@ from zerver.lib.test_classes import WebhookTestCase
class GoogleCodeInTests(WebhookTestCase):
STREAM_NAME = "gci"
URL_TEMPLATE = "/api/v1/external/gci?&api_key={api_key}&stream={stream}"
- FIXTURE_DIR_NAME = "gci"
+ WEBHOOK_DIR_NAME = "gci"
def test_abandon_event_message(self) -> None:
expected_topic = "student-yqqtag"
diff --git a/zerver/webhooks/gitea/tests.py b/zerver/webhooks/gitea/tests.py
index a65f008293d..644be3cbfe1 100644
--- a/zerver/webhooks/gitea/tests.py
+++ b/zerver/webhooks/gitea/tests.py
@@ -6,7 +6,7 @@ from zerver.lib.test_classes import WebhookTestCase
class GiteaHookTests(WebhookTestCase):
STREAM_NAME = "commits"
URL_TEMPLATE = "/api/v1/external/gitea?&api_key={api_key}&stream={stream}"
- FIXTURE_DIR_NAME = "gitea"
+ WEBHOOK_DIR_NAME = "gitea"
def test_multiple_commits(self) -> None:
expected_topic = "test / d"
diff --git a/zerver/webhooks/github/tests.py b/zerver/webhooks/github/tests.py
index 40032fc75f9..6b8af8a08f5 100644
--- a/zerver/webhooks/github/tests.py
+++ b/zerver/webhooks/github/tests.py
@@ -17,7 +17,7 @@ TOPIC_WIKI = "public-repo / wiki pages"
class GitHubWebhookTest(WebhookTestCase):
STREAM_NAME = "github"
URL_TEMPLATE = "/api/v1/external/github?stream={stream}&api_key={api_key}"
- FIXTURE_DIR_NAME = "github"
+ WEBHOOK_DIR_NAME = "github"
def test_ping_event(self) -> None:
expected_message = "GitHub webhook has been successfully configured by TomaszKolek."
diff --git a/zerver/webhooks/gitlab/tests.py b/zerver/webhooks/gitlab/tests.py
index dce0d7e06bf..1cdf793d30f 100644
--- a/zerver/webhooks/gitlab/tests.py
+++ b/zerver/webhooks/gitlab/tests.py
@@ -7,7 +7,7 @@ from zerver.lib.webhooks.git import COMMITS_LIMIT
class GitlabHookTests(WebhookTestCase):
STREAM_NAME = "gitlab"
URL_TEMPLATE = "/api/v1/external/gitlab?&api_key={api_key}&stream={stream}"
- FIXTURE_DIR_NAME = "gitlab"
+ WEBHOOK_DIR_NAME = "gitlab"
def test_push_event_specified_topic(self) -> None:
self.url = self.build_webhook_url("topic=Specific%20topic")
diff --git a/zerver/webhooks/gocd/tests.py b/zerver/webhooks/gocd/tests.py
index c755271df43..befc6f70d2a 100644
--- a/zerver/webhooks/gocd/tests.py
+++ b/zerver/webhooks/gocd/tests.py
@@ -4,7 +4,7 @@ from zerver.lib.test_classes import WebhookTestCase
class GocdHookTests(WebhookTestCase):
STREAM_NAME = "gocd"
URL_TEMPLATE = "/api/v1/external/gocd?stream={stream}&api_key={api_key}"
- FIXTURE_DIR_NAME = "gocd"
+ WEBHOOK_DIR_NAME = "gocd"
TOPIC = "https://github.com/gocd/gocd"
def test_gocd_message(self) -> None:
diff --git a/zerver/webhooks/gogs/tests.py b/zerver/webhooks/gogs/tests.py
index e5d92d81769..d083859e046 100644
--- a/zerver/webhooks/gogs/tests.py
+++ b/zerver/webhooks/gogs/tests.py
@@ -7,7 +7,7 @@ from zerver.lib.webhooks.git import COMMITS_LIMIT
class GogsHookTests(WebhookTestCase):
STREAM_NAME = "commits"
URL_TEMPLATE = "/api/v1/external/gogs?&api_key={api_key}&stream={stream}"
- FIXTURE_DIR_NAME = "gogs"
+ WEBHOOK_DIR_NAME = "gogs"
def test_push(self) -> None:
expected_topic = "try-git / master"
diff --git a/zerver/webhooks/gosquared/tests.py b/zerver/webhooks/gosquared/tests.py
index 6d33f271815..8a8bb851fa4 100644
--- a/zerver/webhooks/gosquared/tests.py
+++ b/zerver/webhooks/gosquared/tests.py
@@ -5,7 +5,7 @@ from zerver.webhooks.gosquared.view import CHAT_MESSAGE_TEMPLATE
class GoSquaredHookTests(WebhookTestCase):
STREAM_NAME = "gosquared"
URL_TEMPLATE = "/api/v1/external/gosquared?stream={stream}&api_key={api_key}"
- FIXTURE_DIR_NAME = "gosquared"
+ WEBHOOK_DIR_NAME = "gosquared"
# Note: Include a test function per each distinct message condition your integration supports
def test_traffic_message(self) -> None:
diff --git a/zerver/webhooks/grafana/tests.py b/zerver/webhooks/grafana/tests.py
index 313aa2ac45b..92e074229ed 100644
--- a/zerver/webhooks/grafana/tests.py
+++ b/zerver/webhooks/grafana/tests.py
@@ -4,7 +4,7 @@ from zerver.lib.test_classes import WebhookTestCase
class GrafanaHookTests(WebhookTestCase):
STREAM_NAME = "grafana"
URL_TEMPLATE = "/api/v1/external/grafana?&api_key={api_key}&stream={stream}"
- FIXTURE_DIR_NAME = "grafana"
+ WEBHOOK_DIR_NAME = "grafana"
# Note: Include a test function per each distinct message condition your integration supports
def test_alert(self) -> None:
diff --git a/zerver/webhooks/greenhouse/tests.py b/zerver/webhooks/greenhouse/tests.py
index f4defb5dc53..dc57df4dcc7 100644
--- a/zerver/webhooks/greenhouse/tests.py
+++ b/zerver/webhooks/greenhouse/tests.py
@@ -6,7 +6,7 @@ from zerver.lib.test_classes import WebhookTestCase
class GreenhouseHookTests(WebhookTestCase):
STREAM_NAME = "greenhouse"
URL_TEMPLATE = "/api/v1/external/greenhouse?stream={stream}&api_key={api_key}"
- FIXTURE_DIR_NAME = "greenhouse"
+ WEBHOOK_DIR_NAME = "greenhouse"
CONTENT_TYPE = "application/x-www-form-urlencoded"
def test_message_candidate_hired(self) -> None:
diff --git a/zerver/webhooks/groove/tests.py b/zerver/webhooks/groove/tests.py
index bca858d8e1b..fd5e2ccb635 100644
--- a/zerver/webhooks/groove/tests.py
+++ b/zerver/webhooks/groove/tests.py
@@ -4,7 +4,7 @@ from zerver.lib.test_classes import WebhookTestCase
class GrooveHookTests(WebhookTestCase):
STREAM_NAME = "groove"
URL_TEMPLATE = "/api/v1/external/groove?stream={stream}&api_key={api_key}"
- FIXTURE_DIR_NAME = "groove"
+ WEBHOOK_DIR_NAME = "groove"
# This test simulates the condition when a new ticket comes.
def test_groove_ticket_started(self) -> None:
diff --git a/zerver/webhooks/harbor/tests.py b/zerver/webhooks/harbor/tests.py
index 0456b214afc..5e60cb40ca3 100644
--- a/zerver/webhooks/harbor/tests.py
+++ b/zerver/webhooks/harbor/tests.py
@@ -6,7 +6,7 @@ from zerver.lib.test_classes import WebhookTestCase
class HarborHookTests(WebhookTestCase):
STREAM_NAME = "harbor"
URL_TEMPLATE = "/api/v1/external/harbor?api_key={api_key}&stream={stream}"
- FIXTURE_DIR_NAME = "harbor"
+ WEBHOOK_DIR_NAME = "harbor"
def test_push_image(self) -> None:
expected_topic = "example/test"
diff --git a/zerver/webhooks/hellosign/tests.py b/zerver/webhooks/hellosign/tests.py
index 107656ac4ad..78a6a74c065 100644
--- a/zerver/webhooks/hellosign/tests.py
+++ b/zerver/webhooks/hellosign/tests.py
@@ -6,7 +6,7 @@ from zerver.lib.test_classes import WebhookTestCase
class HelloSignHookTests(WebhookTestCase):
STREAM_NAME = "hellosign"
URL_TEMPLATE = "/api/v1/external/hellosign?stream={stream}&api_key={api_key}"
- FIXTURE_DIR_NAME = "hellosign"
+ WEBHOOK_DIR_NAME = "hellosign"
def test_signatures_message(self) -> None:
expected_topic = "NDA with Acme Co."
diff --git a/zerver/webhooks/helloworld/tests.py b/zerver/webhooks/helloworld/tests.py
index 7622e42050d..9e7cbeba5b8 100644
--- a/zerver/webhooks/helloworld/tests.py
+++ b/zerver/webhooks/helloworld/tests.py
@@ -8,7 +8,7 @@ class HelloWorldHookTests(WebhookTestCase):
STREAM_NAME = "test"
URL_TEMPLATE = "/api/v1/external/helloworld?&api_key={api_key}&stream={stream}"
PM_URL_TEMPLATE = "/api/v1/external/helloworld?&api_key={api_key}"
- FIXTURE_DIR_NAME = "helloworld"
+ WEBHOOK_DIR_NAME = "helloworld"
# Note: Include a test function per each distinct message condition your integration supports
def test_hello_message(self) -> None:
diff --git a/zerver/webhooks/homeassistant/tests.py b/zerver/webhooks/homeassistant/tests.py
index a09eb9b11ff..411e65de2a9 100644
--- a/zerver/webhooks/homeassistant/tests.py
+++ b/zerver/webhooks/homeassistant/tests.py
@@ -4,7 +4,7 @@ from zerver.lib.test_classes import WebhookTestCase
class HomeAssistantHookTests(WebhookTestCase):
STREAM_NAME = "homeassistant"
URL_TEMPLATE = "/api/v1/external/homeassistant?&api_key={api_key}&stream={stream}"
- FIXTURE_DIR_NAME = "homeassistant"
+ WEBHOOK_DIR_NAME = "homeassistant"
def test_simplereq(self) -> None:
expected_topic = "homeassistant"
diff --git a/zerver/webhooks/ifttt/tests.py b/zerver/webhooks/ifttt/tests.py
index 3074cba53e4..5e9ee9b9aae 100644
--- a/zerver/webhooks/ifttt/tests.py
+++ b/zerver/webhooks/ifttt/tests.py
@@ -4,7 +4,7 @@ from zerver.lib.test_classes import WebhookTestCase
class IFTTTHookTests(WebhookTestCase):
STREAM_NAME = "ifttt"
URL_TEMPLATE = "/api/v1/external/ifttt?stream={stream}&api_key={api_key}"
- FIXTURE_DIR_NAME = "ifttt"
+ WEBHOOK_DIR_NAME = "ifttt"
def test_ifttt_when_subject_and_body_are_correct(self) -> None:
expected_topic = "Email sent from [email protected]"
diff --git a/zerver/webhooks/insping/tests.py b/zerver/webhooks/insping/tests.py
index 054bf08a044..7cb9bd79432 100644
--- a/zerver/webhooks/insping/tests.py
+++ b/zerver/webhooks/insping/tests.py
@@ -4,7 +4,7 @@ from zerver.lib.test_classes import WebhookTestCase
class InspingHookTests(WebhookTestCase):
STREAM_NAME = "test"
URL_TEMPLATE = "/api/v1/external/insping?&api_key={api_key}&stream={stream}"
- FIXTURE_DIR_NAME = "insping"
+ WEBHOOK_DIR_NAME = "insping"
def test_website_state_available_message(self) -> None:
expected_topic = "insping"
diff --git a/zerver/webhooks/intercom/tests.py b/zerver/webhooks/intercom/tests.py
index 6e126d5ceb0..2ffad3f0a9a 100644
--- a/zerver/webhooks/intercom/tests.py
+++ b/zerver/webhooks/intercom/tests.py
@@ -6,7 +6,7 @@ from zerver.lib.test_classes import WebhookTestCase
class IntercomWebHookTests(WebhookTestCase):
STREAM_NAME = "test"
URL_TEMPLATE = "/api/v1/external/intercom?&api_key={api_key}&stream={stream}"
- FIXTURE_DIR_NAME = "intercom"
+ WEBHOOK_DIR_NAME = "intercom"
@patch("zerver.webhooks.intercom.view.check_send_webhook_message")
def test_ping_ignore(self, check_send_webhook_message_mock: MagicMock) -> None:
diff --git a/zerver/webhooks/jira/tests.py b/zerver/webhooks/jira/tests.py
index ea29526abbf..357f46df07f 100644
--- a/zerver/webhooks/jira/tests.py
+++ b/zerver/webhooks/jira/tests.py
@@ -8,7 +8,7 @@ from zerver.lib.users import get_api_key
class JiraHookTests(WebhookTestCase):
STREAM_NAME = "jira"
URL_TEMPLATE = "/api/v1/external/jira?api_key={api_key}&stream={stream}"
- FIXTURE_DIR_NAME = "jira"
+ WEBHOOK_DIR_NAME = "jira"
def test_custom_stream(self) -> None:
api_key = get_api_key(self.test_user)
diff --git a/zerver/webhooks/jotform/tests.py b/zerver/webhooks/jotform/tests.py
index 267bc750c35..2a953c8f642 100644
--- a/zerver/webhooks/jotform/tests.py
+++ b/zerver/webhooks/jotform/tests.py
@@ -4,7 +4,7 @@ from zerver.lib.test_classes import WebhookTestCase
class JotFormHookTests(WebhookTestCase):
STREAM_NAME = "test"
URL_TEMPLATE = "/api/v1/external/jotform?stream={stream}&api_key={api_key}"
- FIXTURE_DIR_NAME = "jotform"
+ WEBHOOK_DIR_NAME = "jotform"
def test_response(self) -> None:
expected_title = "Form"
diff --git a/zerver/webhooks/json/tests.py b/zerver/webhooks/json/tests.py
index 5e4e13a57ef..3f80f8d0b55 100644
--- a/zerver/webhooks/json/tests.py
+++ b/zerver/webhooks/json/tests.py
@@ -6,7 +6,7 @@ from zerver.lib.test_classes import WebhookTestCase
class JsonHookTests(WebhookTestCase):
STREAM_NAME = "json"
URL_TEMPLATE = "/api/v1/external/json?api_key={api_key}&stream={stream}"
- FIXTURE_DIR_NAME = "json"
+ WEBHOOK_DIR_NAME = "json"
def test_json_github_push__1_commit_message(self) -> None:
"""
diff --git a/zerver/webhooks/librato/tests.py b/zerver/webhooks/librato/tests.py
index 67a003899d8..7a146da107f 100644
--- a/zerver/webhooks/librato/tests.py
+++ b/zerver/webhooks/librato/tests.py
@@ -6,7 +6,7 @@ from zerver.lib.test_classes import WebhookTestCase
class LibratoHookTests(WebhookTestCase):
STREAM_NAME = "librato"
URL_TEMPLATE = "/api/v1/external/librato?api_key={api_key}&stream={stream}"
- FIXTURE_DIR_NAME = "librato"
+ WEBHOOK_DIR_NAME = "librato"
IS_ATTACHMENT = False
def get_body(self, fixture_name: str) -> str:
diff --git a/zerver/webhooks/lidarr/tests.py b/zerver/webhooks/lidarr/tests.py
index 3044ad9a85a..5598060e2af 100644
--- a/zerver/webhooks/lidarr/tests.py
+++ b/zerver/webhooks/lidarr/tests.py
@@ -4,7 +4,7 @@ from zerver.lib.test_classes import WebhookTestCase
class LidarrHookTests(WebhookTestCase):
STREAM_NAME = "lidarr"
URL_TEMPLATE = "/api/v1/external/lidarr?api_key={api_key}&stream={stream}"
- FIXTURE_DIR_NAME = "lidarr"
+ WEBHOOK_DIR_NAME = "lidarr"
def test_lidarr_test(self) -> None:
"""
diff --git a/zerver/webhooks/mention/tests.py b/zerver/webhooks/mention/tests.py
index 08f3aa13d81..65f31bacdb3 100644
--- a/zerver/webhooks/mention/tests.py
+++ b/zerver/webhooks/mention/tests.py
@@ -4,7 +4,7 @@ from zerver.lib.test_classes import WebhookTestCase
class MentionHookTests(WebhookTestCase):
STREAM_NAME = "test"
URL_TEMPLATE = "/api/v1/external/mention?api_key={api_key}&stream={stream}"
- FIXTURE_DIR_NAME = "mention"
+ WEBHOOK_DIR_NAME = "mention"
def test_mention_webfeed(self) -> None:
expected_topic = "news"
diff --git a/zerver/webhooks/netlify/tests.py b/zerver/webhooks/netlify/tests.py
index 81d7f934d21..37bdfd818b1 100644
--- a/zerver/webhooks/netlify/tests.py
+++ b/zerver/webhooks/netlify/tests.py
@@ -4,7 +4,7 @@ from zerver.lib.test_classes import WebhookTestCase
class NetlifyHookTests(WebhookTestCase):
STREAM_NAME = "netlify"
URL_TEMPLATE = "/api/v1/external/netlify?stream={stream}&api_key={api_key}"
- FIXTURE_DIR_NAME = "netlify"
+ WEBHOOK_DIR_NAME = "netlify"
def test_building_message(self) -> None:
expected_topic = "master"
diff --git a/zerver/webhooks/newrelic/tests.py b/zerver/webhooks/newrelic/tests.py
index 262499c2aa1..567cf4091e7 100644
--- a/zerver/webhooks/newrelic/tests.py
+++ b/zerver/webhooks/newrelic/tests.py
@@ -4,7 +4,7 @@ from zerver.lib.test_classes import WebhookTestCase
class NewRelicHookTests(WebhookTestCase):
STREAM_NAME = "newrelic"
URL_TEMPLATE = "/api/v1/external/newrelic?stream={stream}&api_key={api_key}"
- FIXTURE_DIR_NAME = "newrelic"
+ WEBHOOK_DIR_NAME = "newrelic"
def test_open(self) -> None:
expected_topic = "Test policy name (1234)"
diff --git a/zerver/webhooks/opbeat/tests.py b/zerver/webhooks/opbeat/tests.py
index 71fb558e50e..fcc3d96181d 100644
--- a/zerver/webhooks/opbeat/tests.py
+++ b/zerver/webhooks/opbeat/tests.py
@@ -5,7 +5,7 @@ from zerver.webhooks.opbeat.view import get_value
class OpbeatHookTests(WebhookTestCase):
STREAM_NAME = "opbeat"
URL_TEMPLATE = "/api/v1/external/opbeat?api_key={api_key}&stream={stream}"
- FIXTURE_DIR_NAME = "opbeat"
+ WEBHOOK_DIR_NAME = "opbeat"
def test_comment(self) -> None:
expected_topic = "foo commented on E#2"
diff --git a/zerver/webhooks/opsgenie/tests.py b/zerver/webhooks/opsgenie/tests.py
index fd8deb18e3f..3ec72ab1109 100644
--- a/zerver/webhooks/opsgenie/tests.py
+++ b/zerver/webhooks/opsgenie/tests.py
@@ -4,7 +4,7 @@ from zerver.lib.test_classes import WebhookTestCase
class OpsGenieHookTests(WebhookTestCase):
STREAM_NAME = "opsgenie"
URL_TEMPLATE = "/api/v1/external/opsgenie?&api_key={api_key}&stream={stream}"
- FIXTURE_DIR_NAME = "opsgenie"
+ WEBHOOK_DIR_NAME = "opsgenie"
def test_acknowledge_alert(self) -> None:
expected_topic = "Integration1"
diff --git a/zerver/webhooks/pagerduty/tests.py b/zerver/webhooks/pagerduty/tests.py
index 9d5c2e03af5..7621e496823 100644
--- a/zerver/webhooks/pagerduty/tests.py
+++ b/zerver/webhooks/pagerduty/tests.py
@@ -4,7 +4,7 @@ from zerver.lib.test_classes import WebhookTestCase
class PagerDutyHookTests(WebhookTestCase):
STREAM_NAME = "pagerduty"
URL_TEMPLATE = "/api/v1/external/pagerduty?api_key={api_key}&stream={stream}"
- FIXTURE_DIR_NAME = "pagerduty"
+ WEBHOOK_DIR_NAME = "pagerduty"
def test_trigger(self) -> None:
expected_message = "Incident [3](https://zulip-test.pagerduty.com/incidents/P140S4Y) triggered by [Test service](https://zulip-test.pagerduty.com/services/PIL5CUQ) (assigned to [armooo](https://zulip-test.pagerduty.com/users/POBCFRJ)).\n\n``` quote\nfoo\n```"
diff --git a/zerver/webhooks/papertrail/tests.py b/zerver/webhooks/papertrail/tests.py
index fe33b268fd4..5083e3333d0 100644
--- a/zerver/webhooks/papertrail/tests.py
+++ b/zerver/webhooks/papertrail/tests.py
@@ -6,7 +6,7 @@ from zerver.lib.test_classes import WebhookTestCase
class PapertrailHookTests(WebhookTestCase):
STREAM_NAME = "papertrail"
URL_TEMPLATE = "/api/v1/external/papertrail?&api_key={api_key}&stream={stream}"
- FIXTURE_DIR_NAME = "papertrail"
+ WEBHOOK_DIR_NAME = "papertrail"
def test_short_message(self) -> None:
expected_topic = "logs"
diff --git a/zerver/webhooks/pingdom/tests.py b/zerver/webhooks/pingdom/tests.py
index afbc46c240d..4e6286e5a88 100644
--- a/zerver/webhooks/pingdom/tests.py
+++ b/zerver/webhooks/pingdom/tests.py
@@ -4,7 +4,7 @@ from zerver.lib.test_classes import WebhookTestCase
class PingdomHookTests(WebhookTestCase):
STREAM_NAME = "pingdom"
URL_TEMPLATE = "/api/v1/external/pingdom?stream={stream}&api_key={api_key}"
- FIXTURE_DIR_NAME = "pingdom"
+ WEBHOOK_DIR_NAME = "pingdom"
def test_pingdom_from_up_to_down_http_check_message(self) -> None:
"""
diff --git a/zerver/webhooks/radarr/tests.py b/zerver/webhooks/radarr/tests.py
index 83b73430f13..e9946261f6a 100644
--- a/zerver/webhooks/radarr/tests.py
+++ b/zerver/webhooks/radarr/tests.py
@@ -4,7 +4,7 @@ from zerver.lib.test_classes import WebhookTestCase
class RadarrHookTests(WebhookTestCase):
STREAM_NAME = "radarr"
URL_TEMPLATE = "/api/v1/external/radarr?api_key={api_key}&stream={stream}"
- FIXTURE_DIR_NAME = "radarr"
+ WEBHOOK_DIR_NAME = "radarr"
def test_radarr_test(self) -> None:
"""
diff --git a/zerver/webhooks/raygun/tests.py b/zerver/webhooks/raygun/tests.py
index 5633435ae03..fcf25658035 100644
--- a/zerver/webhooks/raygun/tests.py
+++ b/zerver/webhooks/raygun/tests.py
@@ -4,7 +4,7 @@ from zerver.lib.test_classes import WebhookTestCase
class RaygunHookTests(WebhookTestCase):
STREAM_NAME = "raygun"
URL_TEMPLATE = "/api/v1/external/raygun?&api_key={api_key}&stream={stream}"
- FIXTURE_DIR_NAME = "raygun"
+ WEBHOOK_DIR_NAME = "raygun"
def test_status_changed_message(self) -> None:
expected_topic = "test"
diff --git a/zerver/webhooks/reviewboard/tests.py b/zerver/webhooks/reviewboard/tests.py
index 4540ef91867..e841b55bb5f 100644
--- a/zerver/webhooks/reviewboard/tests.py
+++ b/zerver/webhooks/reviewboard/tests.py
@@ -4,7 +4,7 @@ from zerver.lib.test_classes import WebhookTestCase
class ReviewBoardHookTests(WebhookTestCase):
STREAM_NAME = "reviewboard"
URL_TEMPLATE = "/api/v1/external/reviewboard?&api_key={api_key}&stream={stream}"
- FIXTURE_DIR_NAME = "reviewboard"
+ WEBHOOK_DIR_NAME = "reviewboard"
def test_review_request_published(self) -> None:
expected_topic = "Scheduler"
diff --git a/zerver/webhooks/semaphore/tests.py b/zerver/webhooks/semaphore/tests.py
index 1e6b3b1592f..0f638f77bad 100644
--- a/zerver/webhooks/semaphore/tests.py
+++ b/zerver/webhooks/semaphore/tests.py
@@ -8,7 +8,7 @@ from zerver.lib.test_classes import WebhookTestCase
class SemaphoreHookTests(WebhookTestCase):
STREAM_NAME = "semaphore"
URL_TEMPLATE = "/api/v1/external/semaphore?stream={stream}&api_key={api_key}"
- FIXTURE_DIR_NAME = "semaphore"
+ WEBHOOK_DIR_NAME = "semaphore"
# Messages are generated by Semaphore on git push. The subject lines below
# contain information on the repo and branch, and the message has links and
diff --git a/zerver/webhooks/sentry/tests.py b/zerver/webhooks/sentry/tests.py
index e1fd80b1530..dad46968f19 100644
--- a/zerver/webhooks/sentry/tests.py
+++ b/zerver/webhooks/sentry/tests.py
@@ -4,7 +4,7 @@ from zerver.lib.test_classes import WebhookTestCase
class SentryHookTests(WebhookTestCase):
STREAM_NAME = "sentry"
URL_TEMPLATE = "/api/v1/external/sentry?&api_key={api_key}&stream={stream}"
- FIXTURE_DIR_NAME = "sentry"
+ WEBHOOK_DIR_NAME = "sentry"
def test_event_for_exception_golang(self) -> None:
expected_topic = '*url.Error: Get "bad_url": unsupported protocol scheme ""'
diff --git a/zerver/webhooks/slack/tests.py b/zerver/webhooks/slack/tests.py
index feeba84f9e6..e86dfe5f806 100644
--- a/zerver/webhooks/slack/tests.py
+++ b/zerver/webhooks/slack/tests.py
@@ -4,7 +4,7 @@ from zerver.lib.test_classes import WebhookTestCase
class SlackWebhookTests(WebhookTestCase):
STREAM_NAME = "slack"
URL_TEMPLATE = "/api/v1/external/slack?stream={stream}&api_key={api_key}"
- FIXTURE_DIR_NAME = "slack"
+ WEBHOOK_DIR_NAME = "slack"
def test_slack_channel_to_topic(self) -> None:
diff --git a/zerver/webhooks/slack_incoming/tests.py b/zerver/webhooks/slack_incoming/tests.py
index fa1a99c280a..3b0a5de9c51 100644
--- a/zerver/webhooks/slack_incoming/tests.py
+++ b/zerver/webhooks/slack_incoming/tests.py
@@ -4,7 +4,7 @@ from zerver.lib.test_classes import WebhookTestCase
class SlackIncomingHookTests(WebhookTestCase):
STREAM_NAME = "slack_incoming"
URL_TEMPLATE = "/api/v1/external/slack_incoming?&api_key={api_key}&stream={stream}"
- FIXTURE_DIR_NAME = "slack_incoming"
+ WEBHOOK_DIR_NAME = "slack_incoming"
def test_message(self) -> None:
expected_topic = "(no topic)"
diff --git a/zerver/webhooks/solano/tests.py b/zerver/webhooks/solano/tests.py
index 369bffc4c4c..d39a634ca6f 100644
--- a/zerver/webhooks/solano/tests.py
+++ b/zerver/webhooks/solano/tests.py
@@ -4,7 +4,7 @@ from zerver.lib.test_classes import WebhookTestCase
class SolanoHookTests(WebhookTestCase):
STREAM_NAME = "solano labs"
URL_TEMPLATE = "/api/v1/external/solano?api_key={api_key}&stream={stream}"
- FIXTURE_DIR_NAME = "solano"
+ WEBHOOK_DIR_NAME = "solano"
def test_solano_message_001(self) -> None:
"""
diff --git a/zerver/webhooks/sonarr/tests.py b/zerver/webhooks/sonarr/tests.py
index 7b8c3ff7108..2dc3c8d8a9f 100644
--- a/zerver/webhooks/sonarr/tests.py
+++ b/zerver/webhooks/sonarr/tests.py
@@ -4,7 +4,7 @@ from zerver.lib.test_classes import WebhookTestCase
class SonarrHookTests(WebhookTestCase):
STREAM_NAME = "sonarr"
URL_TEMPLATE = "/api/v1/external/sonarr?api_key={api_key}&stream={stream}"
- FIXTURE_DIR_NAME = "sonarr"
+ WEBHOOK_DIR_NAME = "sonarr"
def test_sonarr_test(self) -> None:
"""
diff --git a/zerver/webhooks/splunk/tests.py b/zerver/webhooks/splunk/tests.py
index f738c0be232..6d7ea713588 100644
--- a/zerver/webhooks/splunk/tests.py
+++ b/zerver/webhooks/splunk/tests.py
@@ -5,7 +5,7 @@ class SplunkHookTests(WebhookTestCase):
STREAM_NAME = "splunk"
URL_TEMPLATE = "/api/v1/external/splunk?api_key={api_key}&stream={stream}"
- FIXTURE_DIR_NAME = "splunk"
+ WEBHOOK_DIR_NAME = "splunk"
def test_splunk_search_one_result(self) -> None:
self.url = self.build_webhook_url(topic="New Search Alert")
diff --git a/zerver/webhooks/statuspage/tests.py b/zerver/webhooks/statuspage/tests.py
index dc4393b6bbb..23354c7627b 100644
--- a/zerver/webhooks/statuspage/tests.py
+++ b/zerver/webhooks/statuspage/tests.py
@@ -4,7 +4,7 @@ from zerver.lib.test_classes import WebhookTestCase
class StatuspageHookTests(WebhookTestCase):
STREAM_NAME = "statuspage-test"
URL_TEMPLATE = "/api/v1/external/statuspage?api_key={api_key}&stream={stream}"
- FIXTURE_DIR_NAME = "statuspage"
+ WEBHOOK_DIR_NAME = "statuspage"
def test_statuspage_incident(self) -> None:
expected_topic = "Database query delays: All Systems Operational"
diff --git a/zerver/webhooks/stripe/tests.py b/zerver/webhooks/stripe/tests.py
index 37720e174a5..10c0c2dded9 100644
--- a/zerver/webhooks/stripe/tests.py
+++ b/zerver/webhooks/stripe/tests.py
@@ -7,7 +7,7 @@ from zerver.lib.test_classes import WebhookTestCase
class StripeHookTests(WebhookTestCase):
STREAM_NAME = "test"
URL_TEMPLATE = "/api/v1/external/stripe?&api_key={api_key}&stream={stream}"
- FIXTURE_DIR_NAME = "stripe"
+ WEBHOOK_DIR_NAME = "stripe"
def test_charge_dispute_closed(self) -> None:
expected_topic = "disputes"
diff --git a/zerver/webhooks/taiga/tests.py b/zerver/webhooks/taiga/tests.py
index 73e0ff92123..79cb33c1fac 100644
--- a/zerver/webhooks/taiga/tests.py
+++ b/zerver/webhooks/taiga/tests.py
@@ -5,7 +5,7 @@ class TaigaHookTests(WebhookTestCase):
STREAM_NAME = "taiga"
TOPIC = "subject"
URL_TEMPLATE = "/api/v1/external/taiga?stream={stream}&api_key={api_key}"
- FIXTURE_DIR_NAME = "taiga"
+ WEBHOOK_DIR_NAME = "taiga"
def setUp(self) -> None:
super().setUp()
diff --git a/zerver/webhooks/teamcity/tests.py b/zerver/webhooks/teamcity/tests.py
index 6d20add7a5f..dad6f6f3010 100644
--- a/zerver/webhooks/teamcity/tests.py
+++ b/zerver/webhooks/teamcity/tests.py
@@ -10,7 +10,7 @@ class TeamcityHookTests(WebhookTestCase):
STREAM_NAME = "teamcity"
URL_TEMPLATE = "/api/v1/external/teamcity?stream={stream}&api_key={api_key}"
TOPIC = "Project :: Compile"
- FIXTURE_DIR_NAME = "teamcity"
+ WEBHOOK_DIR_NAME = "teamcity"
def test_teamcity_success(self) -> None:
expected_message = "Project :: Compile build 5535 - CL 123456 was successful! :thumbs_up: See [changes](http://teamcity/viewLog.html?buildTypeId=Project_Compile&buildId=19952&tab=buildChangesDiv) and [build log](http://teamcity/viewLog.html?buildTypeId=Project_Compile&buildId=19952)."
@@ -36,7 +36,7 @@ class TeamcityHookTests(WebhookTestCase):
def test_teamcity_personal(self) -> None:
expected_message = "Your personal build for Project :: Compile build 5535 - CL 123456 is broken with status Exit code 1 (new)! :thumbs_down: See [changes](http://teamcity/viewLog.html?buildTypeId=Project_Compile&buildId=19952&tab=buildChangesDiv) and [build log](http://teamcity/viewLog.html?buildTypeId=Project_Compile&buildId=19952)."
payload = orjson.dumps(
- orjson.loads(self.webhook_fixture_data(self.FIXTURE_DIR_NAME, "personal"))
+ orjson.loads(self.webhook_fixture_data(self.WEBHOOK_DIR_NAME, "personal"))
)
self.client_post(self.url, payload, content_type="application/json")
msg = self.get_last_message()
diff --git a/zerver/webhooks/thinkst/tests.py b/zerver/webhooks/thinkst/tests.py
index d5303debf59..e21eade710f 100644
--- a/zerver/webhooks/thinkst/tests.py
+++ b/zerver/webhooks/thinkst/tests.py
@@ -4,7 +4,7 @@ from zerver.lib.test_classes import WebhookTestCase
class ThinkstHookTests(WebhookTestCase):
STREAM_NAME = "thinkst"
URL_TEMPLATE = "/api/v1/external/thinkst?stream={stream}&api_key={api_key}"
- FIXTURE_DIR_NAME = "thinkst"
+ WEBHOOK_DIR_NAME = "thinkst"
def test_canary_dummy(self) -> None:
expected_message = (
diff --git a/zerver/webhooks/transifex/tests.py b/zerver/webhooks/transifex/tests.py
index b1c48223771..aa99b8ad0fc 100644
--- a/zerver/webhooks/transifex/tests.py
+++ b/zerver/webhooks/transifex/tests.py
@@ -8,7 +8,7 @@ class TransifexHookTests(WebhookTestCase):
URL_TEMPLATE = "/api/v1/external/transifex?stream={stream}&api_key={api_key}"
URL_REVIEWED_METHOD_TEMPLATE = "reviewed=100"
URL_TRANSLATED_METHOD_TEMPLATE = "translated=100"
- FIXTURE_DIR_NAME = "transifex"
+ WEBHOOK_DIR_NAME = "transifex"
PROJECT = "project-title"
LANGUAGE = "en"
diff --git a/zerver/webhooks/travis/tests.py b/zerver/webhooks/travis/tests.py
index 6faae0b0a57..eba5262a7b2 100644
--- a/zerver/webhooks/travis/tests.py
+++ b/zerver/webhooks/travis/tests.py
@@ -6,7 +6,7 @@ from zerver.lib.test_classes import WebhookTestCase
class TravisHookTests(WebhookTestCase):
STREAM_NAME = "travis"
URL_TEMPLATE = "/api/v1/external/travis?stream={stream}&api_key={api_key}"
- FIXTURE_DIR_NAME = "travis"
+ WEBHOOK_DIR_NAME = "travis"
TOPIC = "builds"
EXPECTED_MESSAGE = """
Author: josh_mandel
diff --git a/zerver/webhooks/trello/tests.py b/zerver/webhooks/trello/tests.py
index f19c0385ba9..ca9239f8e91 100644
--- a/zerver/webhooks/trello/tests.py
+++ b/zerver/webhooks/trello/tests.py
@@ -9,7 +9,7 @@ from zerver.lib.test_classes import WebhookTestCase
class TrelloHookTests(WebhookTestCase):
STREAM_NAME = "trello"
URL_TEMPLATE = "/api/v1/external/trello?stream={stream}&api_key={api_key}"
- FIXTURE_DIR_NAME = "trello"
+ WEBHOOK_DIR_NAME = "trello"
def test_trello_confirmation_request(self) -> None:
response = self.client_head(self.build_webhook_url())
diff --git a/zerver/webhooks/updown/tests.py b/zerver/webhooks/updown/tests.py
index 524ff760027..23d5a813c1a 100644
--- a/zerver/webhooks/updown/tests.py
+++ b/zerver/webhooks/updown/tests.py
@@ -4,7 +4,7 @@ from zerver.lib.test_classes import WebhookTestCase
class UpdownHookTests(WebhookTestCase):
STREAM_NAME = "updown"
URL_TEMPLATE = "/api/v1/external/updown?stream={stream}&api_key={api_key}"
- FIXTURE_DIR_NAME = "updown"
+ WEBHOOK_DIR_NAME = "updown"
def test_updown_check_down_event(self) -> None:
expected_topic = "https://updown.io"
diff --git a/zerver/webhooks/uptimerobot/tests.py b/zerver/webhooks/uptimerobot/tests.py
index 30962b19bd1..dbd4daf33c9 100644
--- a/zerver/webhooks/uptimerobot/tests.py
+++ b/zerver/webhooks/uptimerobot/tests.py
@@ -7,7 +7,7 @@ from zerver.webhooks.uptimerobot.view import MISCONFIGURED_PAYLOAD_ERROR_MESSAGE
class UptimeRobotHookTests(WebhookTestCase):
STREAM_NAME = "uptimerobot"
URL_TEMPLATE = "/api/v1/external/uptimerobot?stream={stream}&api_key={api_key}"
- FIXTURE_DIR_NAME = "uptimerobot"
+ WEBHOOK_DIR_NAME = "uptimerobot"
def test_uptimerobot_monitor_down(self) -> None:
"""
diff --git a/zerver/webhooks/wordpress/tests.py b/zerver/webhooks/wordpress/tests.py
index a12fc8ceaaf..18702e1f070 100644
--- a/zerver/webhooks/wordpress/tests.py
+++ b/zerver/webhooks/wordpress/tests.py
@@ -4,7 +4,7 @@ from zerver.lib.test_classes import WebhookTestCase
class WordPressHookTests(WebhookTestCase):
STREAM_NAME = "wordpress"
URL_TEMPLATE = "/api/v1/external/wordpress?api_key={api_key}&stream={stream}"
- FIXTURE_DIR_NAME = "wordpress"
+ WEBHOOK_DIR_NAME = "wordpress"
def test_publish_post(self) -> None:
diff --git a/zerver/webhooks/yo/tests.py b/zerver/webhooks/yo/tests.py
index 193b08eb790..1721f2680e8 100644
--- a/zerver/webhooks/yo/tests.py
+++ b/zerver/webhooks/yo/tests.py
@@ -6,7 +6,7 @@ from zerver.lib.test_classes import WebhookTestCase
class YoHookTests(WebhookTestCase):
STREAM_NAME = "yo"
URL_TEMPLATE = "/api/v1/external/yo?api_key={api_key}"
- FIXTURE_DIR_NAME = "yo"
+ WEBHOOK_DIR_NAME = "yo"
def test_yo_message(self) -> None:
"""
diff --git a/zerver/webhooks/zabbix/tests.py b/zerver/webhooks/zabbix/tests.py
index a047afc4719..9911e3d143b 100644
--- a/zerver/webhooks/zabbix/tests.py
+++ b/zerver/webhooks/zabbix/tests.py
@@ -7,7 +7,7 @@ from zerver.webhooks.zabbix.view import MISCONFIGURED_PAYLOAD_ERROR_MESSAGE
class ZabbixHookTests(WebhookTestCase):
STREAM_NAME = "zabbix"
URL_TEMPLATE = "/api/v1/external/zabbix?api_key={api_key}&stream={stream}"
- FIXTURE_DIR_NAME = "zabbix"
+ WEBHOOK_DIR_NAME = "zabbix"
def test_zabbix_alert_message(self) -> None:
"""
diff --git a/zerver/webhooks/zapier/tests.py b/zerver/webhooks/zapier/tests.py
index 2e102bca1fb..f442e4d908d 100644
--- a/zerver/webhooks/zapier/tests.py
+++ b/zerver/webhooks/zapier/tests.py
@@ -4,7 +4,7 @@ from zerver.lib.test_classes import WebhookTestCase
class ZapierHookTests(WebhookTestCase):
STREAM_NAME = "zapier"
URL_TEMPLATE = "/api/v1/external/zapier?stream={stream}&api_key={api_key}"
- FIXTURE_DIR_NAME = "zapier"
+ WEBHOOK_DIR_NAME = "zapier"
def test_zapier_when_subject_and_body_are_correct(self) -> None:
expected_topic = "New email from [email protected]"
@@ -27,7 +27,7 @@ class ZapierHookTests(WebhookTestCase):
class ZapierZulipAppTests(WebhookTestCase):
STREAM_NAME = "zapier"
URL_TEMPLATE = "/api/v1/external/zapier?api_key={api_key}&stream={stream}"
- FIXTURE_DIR_NAME = "zapier"
+ WEBHOOK_DIR_NAME = "zapier"
def test_auth(self) -> None:
payload = self.get_body("zapier_zulip_app_auth")