Skip to content

Commit

Permalink
fix: vulture
Browse files Browse the repository at this point in the history
  • Loading branch information
MrCloudSec committed Feb 28, 2025
1 parent 1716446 commit 83c1414
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions tests/providers/aws/services/sns/sns_service_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ def test_list_tags_for_resource_resource_not_found(self):
class FakeClient:
region = "us-east-1"

def list_tags_for_resource(self, ResourceArn):
def list_tags_for_resource(self, _):
error_response = {
"Error": {
"Code": "ResourceNotFoundException",
Expand Down Expand Up @@ -166,7 +166,7 @@ def test_list_tags_for_resource_other_error(self):
class FakeClientOther:
region = "us-west-1"

def list_tags_for_resource(self, ResourceArn):
def list_tags_for_resource(self, _):
error_response = {
"Error": {"Code": "SomeOtherError", "Message": "Some Other Error"}
}
Expand Down Expand Up @@ -239,7 +239,7 @@ def test_get_topic_attributes_exception(self, caplog):
class FakeClient:
region = dummy_region

def get_topic_attributes(self, TopicArn):
def get_topic_attributes(self, _):
raise Exception("Test exception in get_topic_attributes")

sns.regional_clients[dummy_region] = FakeClient()
Expand Down Expand Up @@ -271,7 +271,7 @@ def test_list_subscriptions_by_topic_exception(self, caplog):
class FakeRegionalClient:
region = "dummy-region"

def list_subscriptions_by_topic(self, TopicArn):
def list_subscriptions_by_topic(self, _):
raise Exception("Test exception in list_subscriptions_by_topic")

# Create an AWS provider with the dummy region and initialize SNS.
Expand Down Expand Up @@ -316,7 +316,7 @@ def test_get_topic_attributes_no_policy_no_kms(self):
class FakeNoDetailClient:
region = dummy_region

def get_topic_attributes(self, TopicArn):
def get_topic_attributes(self, _):
return {"Attributes": {"Dummy": "value"}}

sns.regional_clients[dummy_region] = FakeNoDetailClient()
Expand Down Expand Up @@ -346,7 +346,7 @@ def test_list_subscriptions_by_topic_unknown_region(self):
class FakeRegionalClient:
region = "dummy-region"

def list_subscriptions_by_topic(self, TopicArn):
def list_subscriptions_by_topic(self, _):
# Return a subscription whose ARN doesn't include colon separators.
return {
"Subscriptions": [
Expand Down Expand Up @@ -390,7 +390,7 @@ def test_list_topics_with_audit_resources_filter(self, monkeypatch):

def fake_get_paginator(self, operation_name):
class FakePaginator:
def paginate(inner_self):
def paginate(_):
return [{"Topics": [{"TopicArn": fake_topic_arn}]}]

return FakePaginator()
Expand Down Expand Up @@ -434,7 +434,7 @@ def test_list_topics_with_audit_resources_filter(monkeypatch):
# Define a fake paginator that returns one topic.
def fake_get_paginator(operation_name):
class FakePaginator:
def paginate(inner_self):
def paginate(_):
return [{"Topics": [{"TopicArn": fake_topic_arn}]}]

return FakePaginator()
Expand All @@ -447,14 +447,14 @@ def __init__(self, region):
def get_paginator(self, operation_name):
return fake_get_paginator(operation_name)

def get_topic_attributes(self, TopicArn):
def get_topic_attributes(self, _):
# Returning empty Attributes dict to mimic no extra data.
return {"Attributes": {}}

def list_tags_for_resource(self, ResourceArn):
def list_tags_for_resource(self, _):
return {"Tags": []}

def list_subscriptions_by_topic(self, TopicArn):
def list_subscriptions_by_topic(self, _):
return {"Subscriptions": []}

# Create a fake regional client for the monkey_region.
Expand Down

0 comments on commit 83c1414

Please sign in to comment.