def test_get_remote_user_err(self):
     env = {'REMOTE_USER': "******"}
     try:
         ku.get_remote_user(env)
     except RuntimeError as err:
         self.assertTrue(err.args[0].startswith("Malformed REMOTE_USER"))
     else:
         self.fail("Expected RuntimeError")
Пример #2
0
 def test_get_remote_user_err(self):
     env = {'REMOTE_USER': "******"}
     try:
         ku.get_remote_user(env)
     except RuntimeError as err:
         self.assertTrue(err.args[0].startswith("Malformed REMOTE_USER"))
     else:
         self.fail("Expected RuntimeError")
 def test_get_remote_user(self):
     env = {'REMOTE_USER': "******"}
     result = ku.get_remote_user(env)
     self.assertEqual(result, "auth_admin")
Пример #4
0
 def test_get_remote_user(self):
     env = {'REMOTE_USER': "******"}
     result = ku.get_remote_user(env)
     self.assertEqual(result, "auth_admin")