mirror of
https://github.com/avatao-content/test-tutorial-framework
synced 2024-11-14 15:57:17 +00:00
Further reduce user_ops line length in preparation for monaco
This commit is contained in:
parent
321699c644
commit
5180edbaf6
@ -13,7 +13,10 @@ class UserOps:
|
|||||||
self.password = password
|
self.password = password
|
||||||
self.db_session = db_session
|
self.db_session = db_session
|
||||||
self.message_sender = MessageSender()
|
self.message_sender = MessageSender()
|
||||||
self.log = partial(self.message_sender.send, 'Authenticator')
|
self.log = partial(
|
||||||
|
self.message_sender.send,
|
||||||
|
'Authenticator'
|
||||||
|
)
|
||||||
|
|
||||||
def authenticate(self):
|
def authenticate(self):
|
||||||
"""
|
"""
|
||||||
@ -31,7 +34,10 @@ class UserOps:
|
|||||||
self.password,
|
self.password,
|
||||||
user.passwordhash
|
user.passwordhash
|
||||||
):
|
):
|
||||||
self.log(f'Invalid credentials for user "{self.username}"!')
|
self.log(
|
||||||
|
f'Invalid credentials for '
|
||||||
|
f'user "{self.username}"!'
|
||||||
|
)
|
||||||
raise InvalidCredentialsError
|
raise InvalidCredentialsError
|
||||||
|
|
||||||
self.log(f'User "{self.username}" logged in!')
|
self.log(f'User "{self.username}" logged in!')
|
||||||
|
Loading…
Reference in New Issue
Block a user