deluge/deluge/tests/test_authmanager.py
bendikro 448261394f [Tests] Changes to tests and test configs of Travis/tox
* Added pip chaching
* Added disable_new_release_check to tracker icons tests
* Fixed test_torrentview
* Require minimum tox version 1.8
* Fixed GTKUI tests and testcoverage by using xvfb on travis
* Separated the apt dependencies for commands requiering GTKUI deps
2014-12-01 10:52:16 +00:00

22 lines
602 B
Python

import deluge.component as component
from deluge.core.authmanager import AUTH_LEVEL_ADMIN, AuthManager
from .basetest import BaseTestCase
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):
from deluge.ui import common
self.assertEquals(
self.auth.authorize(*common.get_localhost_auth()),
AUTH_LEVEL_ADMIN
)