Skip to content

Commit 692b309

Browse files
committed
Deleting not used tags.
1 parent 788a90a commit 692b309

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

tests/conftest.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,10 @@ def start_patch(target: str):
4646
return p.start()
4747

4848
# Local, temporary dummy modules only if truly missing
49-
if importlib.util.find_spec("confluent_kafka") is None: # pragma: no cover - environment dependent
49+
if importlib.util.find_spec("confluent_kafka") is None:
5050
dummy_ck = types.ModuleType("confluent_kafka")
5151

52-
class DummyProducer: # minimal interface
52+
class DummyProducer:
5353
def __init__(self, *_, **__):
5454
pass
5555

@@ -58,18 +58,18 @@ def produce(self, *_, **kwargs):
5858
if cb:
5959
cb(None, None)
6060

61-
def flush(self): # noqa: D401 - simple stub
61+
def flush(self):
6262
return None
6363

64-
dummy_ck.Producer = DummyProducer # type: ignore[attr-defined]
64+
dummy_ck.Producer = DummyProducer
6565

6666
class DummyKafkaException(Exception):
6767
pass
6868

69-
dummy_ck.KafkaException = DummyKafkaException # type: ignore[attr-defined]
69+
dummy_ck.KafkaException = DummyKafkaException
7070
exit_stack.enter_context(patch.dict(sys.modules, {"confluent_kafka": dummy_ck}))
7171

72-
if importlib.util.find_spec("psycopg2") is None: # pragma: no cover - environment dependent
72+
if importlib.util.find_spec("psycopg2") is None:
7373
dummy_pg = types.ModuleType("psycopg2")
7474
exit_stack.enter_context(patch.dict(sys.modules, {"psycopg2": dummy_pg}))
7575

@@ -94,11 +94,11 @@ def get(self):
9494
return {"Body": MockS3ObjectBody()}
9595

9696
class MockS3Bucket:
97-
def Object(self, _key): # noqa: D401 - simple proxy
97+
def Object(self, _key):
9898
return MockS3Object()
9999

100100
class MockS3Resource:
101-
def Bucket(self, _name): # noqa: D401 - simple proxy
101+
def Bucket(self, _name):
102102
return MockS3Bucket()
103103

104104
mock_session = start_patch("boto3.Session")

tests/handlers/test_handler_token.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ def test_decode_jwt_all_second_key_succeeds(event_gate_module):
6767
second_key = object()
6868
event_gate_module.handler_token.public_keys = [first_key, second_key]
6969

70-
def decode_side_effect(token, key, algorithms): # noqa: D401 - test stub
70+
def decode_side_effect(token, key, algorithms):
7171
if key is first_key:
7272
raise event_gate_module.jwt.PyJWTError("signature mismatch")
7373
return {"sub": "TestUser"}
@@ -82,7 +82,7 @@ def test_decode_jwt_all_all_keys_fail(event_gate_module):
8282
bad_keys = [object(), object()]
8383
event_gate_module.handler_token.public_keys = bad_keys
8484

85-
def always_fail(token, key, algorithms): # noqa: D401 - test stub
85+
def always_fail(token, key, algorithms):
8686
raise event_gate_module.jwt.PyJWTError("bad signature")
8787

8888
with patch.object(event_gate_module.jwt, "decode", side_effect=always_fail, create=True):

0 commit comments

Comments
 (0)