mirror of
https://github.com/codex-storage/deluge.git
synced 2025-02-21 23:58:25 +00:00
* 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
22 lines
602 B
Python
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
|
|
)
|