deluge/deluge/tests/test_authmanager.py
Pedro Algarvio f41f6ad46a Test fixes and #1814 fix.
All test were adapted, and some more were added to comply with the new multiuser support in deluge.
Regarding #1814, host entries in the Connection Manager UI are now migrated from the old format were automatic localhost logins were possible, which no longer is.
2011-04-27 19:32:13 +01:00

18 lines
442 B
Python

from twisted.trial import unittest
import common
from deluge.core.authmanager import AuthManager, AUTH_LEVEL_ADMIN
class AuthManagerTestCase(unittest.TestCase):
def setUp(self):
self.auth = AuthManager()
self.auth.start()
def test_authorize(self):
from deluge.ui import common
self.assertEquals(
self.auth.authorize(*common.get_localhost_auth()),
AUTH_LEVEL_ADMIN
)