~juju-gui/charms/precise/juju-gui/trunk

« back to all changes in this revision

Viewing changes to server/guiserver/tests/test_apps.py

  • Committer: Francesco Banconi
  • Date: 2013-08-08 08:04:08 UTC
  • mfrom: (85.1.7 guiserver-auth-fixes)
  • Revision ID: francesco.banconi@canonical.com-20130808080408-hevf5j8ycja8nntv
Authentication fixes.

Fixed an error in the guiserver authentication 
when the request id is set to 0.

Moved the auth_backend from the app to the 
handler: it is only relevant in the WebSocketHandler
context.

Some clean up in the tests.

R=benjamin.saller, matthew.scott
CC=
https://codereview.appspot.com/12612043

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
 
23
23
from guiserver import (
24
24
    apps,
25
 
    auth,
26
25
    handlers,
27
26
)
28
27
 
90
89
        spec = self.get_url_spec(app, r'^/test/(.*)$')
91
90
        self.assertIsNone(spec)
92
91
 
93
 
    def test_auth_backend(self):
94
 
        # The server settings include the currently used auth backend.
95
 
        app = self.get_app(apiversion='go')
96
 
        self.assertIn('auth_backend', app.settings)
97
 
        self.assertIsInstance(app.settings['auth_backend'], auth.GoBackend)
98
 
 
99
92
 
100
93
class TestRedirector(AppsTestMixin, unittest.TestCase):
101
94