Skip to content

Commit 445e3dc

Browse files
Island: Rename AuthenticationOTPGenerator to
AuthenticationServiceOTPGenerator
1 parent 2abdf24 commit 445e3dc

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

monkey/monkey_island/cc/services/authentication_service/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44
from .setup import setup_authentication
55

66
from .i_otp_generator import IOTPGenerator
7-
from .authentication_otp_generator import AuthenticationOTPGenerator
7+
from .authentication_service_otp_generator import AuthenticationServiceOTPGenerator

monkey/monkey_island/cc/services/authentication_service/authentication_otp_generator.py monkey/monkey_island/cc/services/authentication_service/authentication_service_otp_generator.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
from .types import OTP
44

55

6-
class AuthenticationOTPGenerator(IOTPGenerator):
6+
class AuthenticationServiceOTPGenerator(IOTPGenerator):
77
"""
88
Generates OTPs
99
"""
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
from unittest.mock import MagicMock
22

3-
from monkey_island.cc.services.authentication_service import AuthenticationOTPGenerator
3+
from monkey_island.cc.services.authentication_service import AuthenticationServiceOTPGenerator
44
from monkey_island.cc.services.authentication_service.authentication_facade import (
55
AuthenticationFacade,
66
)
77

88

9-
def test_authentication_otp_generator__generates_otp():
9+
def test_authentication_service_otp_generator__generates_otp():
1010
mock_authentication_facade = MagicMock(spec=AuthenticationFacade)
1111

12-
otp_generator = AuthenticationOTPGenerator(mock_authentication_facade)
12+
otp_generator = AuthenticationServiceOTPGenerator(mock_authentication_facade)
1313
otp_generator.generate_otp()
1414

1515
assert mock_authentication_facade.generate_otp.called_once

vulture_allowlist.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
MongoAgentEventRepository,
2525
MongoOTPRepository,
2626
)
27-
from monkey_island.cc.services.authentication_service import AuthenticationOTPGenerator
27+
from monkey_island.cc.services.authentication_service import AuthenticationServiceOTPGenerator
2828
from monkey_island.cc.services.authentication_service.token import TokenValidator
2929
from monkey_island.cc.services.authentication_service.user import User
3030
from monkey_island.cc.services.reporting.exploitations.monkey_exploitation import MonkeyExploitation
@@ -161,4 +161,4 @@
161161
IOTPRepository.get_expiration
162162
IOTPRepository.reset
163163
MongoOTPRepository
164-
AuthenticationOTPGenerator.generate_otp
164+
AuthenticationServiceOTPGenerator.generate_otp

0 commit comments

Comments
 (0)