mirror of
https://github.com/ets-labs/python-dependency-injector.git
synced 2024-11-22 01:26:51 +03:00
Update quotes in password-hashing example
This commit is contained in:
parent
8bea62eeee
commit
274d1fe53b
|
@ -15,8 +15,8 @@ class UserService:
|
|||
def create_user(self, name: str, password: str) -> Dict[str, str]:
|
||||
hashed_password = self._password_hasher(password)
|
||||
return {
|
||||
'name': name,
|
||||
'password': hashed_password,
|
||||
"name": name,
|
||||
"password": hashed_password,
|
||||
}
|
||||
|
||||
|
||||
|
@ -36,15 +36,15 @@ class Container(containers.DeclarativeContainer):
|
|||
)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
if __name__ == "__main__":
|
||||
container = Container(
|
||||
config={
|
||||
'salt_size': 16,
|
||||
'rounds': 10000,
|
||||
"salt_size": 16,
|
||||
"rounds": 10000,
|
||||
},
|
||||
)
|
||||
|
||||
user_service = container.user_service()
|
||||
|
||||
user = user_service.create_user(name='Roman', password='secret1')
|
||||
user = user_service.create_user(name="Roman", password="secret1")
|
||||
print(user)
|
||||
|
|
Loading…
Reference in New Issue
Block a user