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()), 10)
示例#2
0
class AuthManagerTestCase(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):
        self.assertEqual(self.auth.authorize(*get_localhost_auth()),
                         AUTH_LEVEL_ADMIN)
示例#3
0
class AuthManagerTestCase(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):
        self.assertEqual(
            self.auth.authorize(*get_localhost_auth()),
            AUTH_LEVEL_ADMIN
        )