Commits

Gregory Petukhov committed f53fac6

Fix tests

Comments (0)

Files changed (2)

             data_files.append(os.path.join(prefix, f))
 
 setup(
-    version = '0.1.1',
+    version = '0.1.2',
     description = 'Django application for user authentication with key in hypertext link',
     author = 'Grigoriy Petukhov',
     author_email = 'lorien@lorien.name',
 
 from urlauth.util import wrap_url, load_key, InvalidKey
 from urlauth.models import AuthKey
-from urlauth.signals import key_processed, key_loaded
+from urlauth.signals import key_user_found, key_loaded
 
 class UrlauthTestCase(TestCase):
     urls = 'urlauth.tests'
         url = wrap_url(url, **kwargs)
         path, args = url.split('?')[0], cgi.parse_qs(url.split('?')[1])
         self.client.get(url, args)
-        hash = args[settings.URLAUTH_AUTHKEY_NAME][0]
-        return hash
+        return args[settings.URLAUTH_AUTHKEY_NAME][0]
 
     # Test cases
 
         logs = []
 
         handler1 = lambda **k: logs.append('L')
-        handler2 = lambda **k: logs.append('P')
+        handler2 = lambda **k: logs.append('U')
 
-        key_processed.connect(handler1)
-        key_processed.connect(handler2)
+        key_loaded.connect(handler1)
+        key_user_found.connect(handler2)
 
         self.assertEqual(0, len(logs))
         self.client.logout()