Commit 445e3dc 1 parent 2abdf24 commit 445e3dc Copy full SHA for 445e3dc
File tree 4 files changed +7
-7
lines changed
monkey_island/cc/services/authentication_service
tests/unit_tests/monkey_island/cc/services/authentication_service
4 files changed +7
-7
lines changed Original file line number Diff line number Diff line change 4
4
from .setup import setup_authentication
5
5
6
6
from .i_otp_generator import IOTPGenerator
7
- from .authentication_otp_generator import AuthenticationOTPGenerator
7
+ from .authentication_service_otp_generator import AuthenticationServiceOTPGenerator
Original file line number Diff line number Diff line change 3
3
from .types import OTP
4
4
5
5
6
- class AuthenticationOTPGenerator (IOTPGenerator ):
6
+ class AuthenticationServiceOTPGenerator (IOTPGenerator ):
7
7
"""
8
8
Generates OTPs
9
9
"""
Original file line number Diff line number Diff line change 1
1
from unittest .mock import MagicMock
2
2
3
- from monkey_island .cc .services .authentication_service import AuthenticationOTPGenerator
3
+ from monkey_island .cc .services .authentication_service import AuthenticationServiceOTPGenerator
4
4
from monkey_island .cc .services .authentication_service .authentication_facade import (
5
5
AuthenticationFacade ,
6
6
)
7
7
8
8
9
- def test_authentication_otp_generator__generates_otp ():
9
+ def test_authentication_service_otp_generator__generates_otp ():
10
10
mock_authentication_facade = MagicMock (spec = AuthenticationFacade )
11
11
12
- otp_generator = AuthenticationOTPGenerator (mock_authentication_facade )
12
+ otp_generator = AuthenticationServiceOTPGenerator (mock_authentication_facade )
13
13
otp_generator .generate_otp ()
14
14
15
15
assert mock_authentication_facade .generate_otp .called_once
Original file line number Diff line number Diff line change 24
24
MongoAgentEventRepository ,
25
25
MongoOTPRepository ,
26
26
)
27
- from monkey_island .cc .services .authentication_service import AuthenticationOTPGenerator
27
+ from monkey_island .cc .services .authentication_service import AuthenticationServiceOTPGenerator
28
28
from monkey_island .cc .services .authentication_service .token import TokenValidator
29
29
from monkey_island .cc .services .authentication_service .user import User
30
30
from monkey_island .cc .services .reporting .exploitations .monkey_exploitation import MonkeyExploitation
161
161
IOTPRepository .get_expiration
162
162
IOTPRepository .reset
163
163
MongoOTPRepository
164
- AuthenticationOTPGenerator .generate_otp
164
+ AuthenticationServiceOTPGenerator .generate_otp
You can’t perform that action at this time.
0 commit comments