Refactor someName => some_name in access classes
This commit is contained in:
1 parent
f45cb1560f
commit
4e0d3725cb
12 files changed
+155
-81
No files matched your search
@@ -151,7 +151,7 @@ class PermissionManagerTestCase(unittest.TestCase):
|
||||
for expected in data_groups:
|
||||
permission = octoprint.server.permissionManager.find_permission(expected["name"])
|
||||
|
||||
self.assertDictEqual(permission.asDict(), expected)
|
||||
self.assertDictEqual(permission.as_dict(), expected)
|
||||
|
||||
def test_remove_permission(self):
|
||||
octoprint.server.permissionManager.remove_permission("Plugin_permissions_plugin_fancy permission")
|
||||
@@ -235,7 +235,7 @@ class UserTestCase(unittest.TestCase):
|
||||
|
||||
# we need to sort the needs, permissions and groups
|
||||
# these values could be in any order so we need to sort them to have a defined order for the assertEqual
|
||||
asDict = sort_attributes(user.asDict())
|
||||
asDict = sort_attributes(user.as_dict())
|
||||
expected = sort_attributes(expected)
|
||||
|
||||
self.assertDictEqual(expected, asDict)
|
||||
@@ -266,7 +266,7 @@ class UserTestCase(unittest.TestCase):
|
||||
user = getattr(self, uservar)
|
||||
|
||||
# we need to sort the needs
|
||||
asDict = sort_attributes(user.asDict())
|
||||
asDict = sort_attributes(user.as_dict())
|
||||
expected = sort_attributes(expected)
|
||||
|
||||
self.assertDictEqual(expected, asDict)
|
||||
|
||||
@@ -9,7 +9,7 @@ __copyright__ = "Copyright (C) 2017 The OctoPrint Project - Released under terms
|
||||
import unittest
|
||||
import ddt
|
||||
|
||||
import octoprint.users
|
||||
import octoprint.access.users
|
||||
|
||||
@ddt.ddt
|
||||
class UserManagerTest(unittest.TestCase):
|
||||
@@ -21,4 +21,4 @@ class UserManagerTest(unittest.TestCase):
|
||||
salt = "abc"
|
||||
|
||||
# should not throw an exception
|
||||
octoprint.access.users.UserManager.createPasswordHash(password, salt=salt)
|
||||
octoprint.access.users.UserManager.create_password_hash(password, salt=salt)
|
||||
Reference in new issue
Block a user