* pyupgrade
* various new codemods
* manual removal of Py2/3 compat imports
* manual adjustment of docs, examples, tests
* to_str is now the new to_unicode, deprecated
redirection to to_bytes has been removed
* to_native_str has been redirected to point to
to_str
* to_unicode has been redirected to point to
to_str
* atomic_write refactored to use
NamedTemporaryDirectory
* various other fixes/refactorings all over the
place
25 lines
641 B
Python
25 lines
641 B
Python
"""
|
|
Unit tests for octoprint.access.users.UserManager
|
|
"""
|
|
|
|
__license__ = "GNU Affero General Public License http://www.gnu.org/licenses/agpl.html"
|
|
__copyright__ = "Copyright (C) 2017 The OctoPrint Project - Released under terms of the AGPLv3 License"
|
|
|
|
import unittest
|
|
|
|
import ddt
|
|
|
|
import octoprint.access.users
|
|
|
|
|
|
@ddt.ddt
|
|
class UserManagerTest(unittest.TestCase):
|
|
def test_createPasswordHash_nonascii(self):
|
|
"""Test for issue #1891"""
|
|
|
|
password = "password with ümläutß"
|
|
salt = "abc"
|
|
|
|
# should not throw an exception
|
|
octoprint.access.users.UserManager.create_password_hash(password, salt=salt)
|