def test_password_is_not_stored_plain(authentication: Authentication) -> None: user = authentication.user_data(username=EXISTING_USERNAME) assert user["password"] != CORRECT_PASSWORD assert user["password"] == authentication._hash_password(CORRECT_PASSWORD)
def test_retrieve_user_data(authentication: Authentication) -> None: user = authentication.user_data(username=EXISTING_USERNAME) assert user is not None for key in ["username", "password", "default_calendar"]: assert key in user assert user[key] is not None