Skip to content

Commit

Permalink
Removed global S106 ignores, added inlines
Browse files Browse the repository at this point in the history
  • Loading branch information
fritzbrand committed Oct 23, 2024
1 parent d5f1c08 commit 8b87d7a
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 15 deletions.
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@ ignore = [
# TODO: Move this somewhere sensible?
"**/tests.py" = [
"S101", # It's okay to use `assert` in tests.
"S106", # Its okay to use harcoded passwords in tests
]

"**/config/settings/{test,dev}.py" = [
Expand Down
28 changes: 14 additions & 14 deletions rp_interceptors/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ def test_hmac_missing(self):
"""
interceptor = Interceptor.objects.create(
org=self.org,
hmac_secret="test-secret",
channel_uuid="1234343212", # noqa: S106 - Hardcoded passwords OK for tests
hmac_secret="test-secret", # noqa: S106 - Its OK to hardcode passwords in tests
channel_uuid="1234343212", # noqa: S106 - Its OK to hardcode passwords in tests
)
url = reverse("interceptor-status", args=[interceptor.pk])
data = {"test": "body"}
Expand All @@ -51,8 +51,8 @@ def test_status_request(self):
"""
interceptor: Interceptor = Interceptor.objects.create(
org=self.org,
hmac_secret="test-secret",
channel_uuid="1234343212", # noqa: S106 - Hardcoded passwords OK for tests
hmac_secret="test-secret", # noqa: S106 - Its OK to hardcode passwords in tests
channel_uuid="1234343212", # noqa: S106 - Its OK to hardcode passwords in tests
)
url: str = reverse("interceptor-status", args=[interceptor.pk])
data = {
Expand Down Expand Up @@ -105,8 +105,8 @@ def test_empty_status_request(self):
"""
interceptor: Interceptor = Interceptor.objects.create(
org=self.org,
hmac_secret="test-secret",
channel_uuid="1234343212", # noqa: S106 - Hardcoded passwords OK for tests
hmac_secret="test-secret", # noqa: S106 - Its OK to hardcode passwords in tests
channel_uuid="1234343212", # noqa: S106 - Its OK to hardcode passwords in tests
)
url: str = reverse("interceptor-status", args=[interceptor.pk])
data = {"statuses": [{}]}
Expand All @@ -126,8 +126,8 @@ def test_non_status_request(self):
"""
interceptor: Interceptor = Interceptor.objects.create(
org=self.org,
hmac_secret="test-secret",
channel_uuid="1234343212", # noqa: S106 - Hardcoded passwords OK for tests
hmac_secret="test-secret", # noqa: S106 - Its OK to hardcode passwords in tests
channel_uuid="1234343212", # noqa: S106 - Its OK to hardcode passwords in tests
)
url: str = reverse("interceptor-status", args=[interceptor.pk])
data = {
Expand Down Expand Up @@ -165,8 +165,8 @@ def test_status_request_no_message_key(self):
"""
interceptor: Interceptor = Interceptor.objects.create(
org=self.org,
hmac_secret="test-secret",
channel_uuid="1234343212", # noqa: S106 - Hardcoded passwords OK for tests
hmac_secret="test-secret", # noqa: S106 - Its OK to hardcode passwords in tests
channel_uuid="1234343212", # noqa: S106 - Its OK to hardcode passwords in tests
)
url: str = reverse("interceptor-status", args=[interceptor.pk])
data = {
Expand Down Expand Up @@ -203,8 +203,8 @@ def test_status_request_contains_recipient_id(self):
"""
interceptor: Interceptor = Interceptor.objects.create(
org=self.org,
hmac_secret="test-secret",
channel_uuid="1234343212", # noqa: S106 - Hardcoded passwords OK for tests
hmac_secret="test-secret", # noqa: S106 - Its OK to hardcode passwords in tests
channel_uuid="1234343212", # noqa: S106 - Its OK to hardcode passwords in tests
)
url: str = reverse("interceptor-status", args=[interceptor.pk])
data = {
Expand Down Expand Up @@ -244,8 +244,8 @@ def test_status_request_msg_has_no_recipient_id(self):
"""
interceptor: Interceptor = Interceptor.objects.create(
org=self.org,
hmac_secret="test-secret",
channel_uuid="1234343212", # noqa: S106 - Hardcoded passwords OK for tests
hmac_secret="test-secret", # noqa: S106 - Its OK to hardcode passwords in tests
channel_uuid="1234343212", # noqa: S106 - Its OK to hardcode passwords in tests
)
url: str = reverse("interceptor-status", args=[interceptor.pk])
data = {
Expand Down

0 comments on commit 8b87d7a

Please sign in to comment.