diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-10 21:38:38 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-10 21:38:38 +0000 |
commit | 2e2851dc13d73352530dd4495c7e05603b2e520d (patch) | |
tree | 622b9cd8e5d32091c9aa9e4937b533975a40356c /deluge/tests/test_authmanager.py | |
parent | Initial commit. (diff) | |
download | deluge-2e2851dc13d73352530dd4495c7e05603b2e520d.tar.xz deluge-2e2851dc13d73352530dd4495c7e05603b2e520d.zip |
Adding upstream version 2.1.2~dev0+20240219.upstream/2.1.2_dev0+20240219upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'deluge/tests/test_authmanager.py')
-rw-r--r-- | deluge/tests/test_authmanager.py | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/deluge/tests/test_authmanager.py b/deluge/tests/test_authmanager.py new file mode 100644 index 0000000..aa86fdb --- /dev/null +++ b/deluge/tests/test_authmanager.py @@ -0,0 +1,23 @@ +# +# This file is part of Deluge and is licensed under GNU General Public License 3.0, or later, with +# the additional special exception to link portions of this program with the OpenSSL library. +# See LICENSE for more details. +# + +import deluge.component as component +from deluge.common import get_localhost_auth +from deluge.conftest import BaseTestCase +from deluge.core.authmanager import AUTH_LEVEL_ADMIN, AuthManager + + +class TestAuthManager(BaseTestCase): + def set_up(self): + self.auth = AuthManager() + self.auth.start() + + def tear_down(self): + # We must ensure that the components in component registry are removed + return component.shutdown() + + def test_authorize(self): + assert self.auth.authorize(*get_localhost_auth()) == AUTH_LEVEL_ADMIN |