def test_drupal_cookie_parse__multiple_cookies(self): # pick out the correct Drupal cookie for this server (Drupal cookies are per-sub-domain) res = DrupalAuthMiddleware._drupal_cookie_parse(self.drupal_cookies, self.environ['SERVER_NAME']) assert_equal(res, 'ae257e890935e0cc123ccc71797668e4')
def test_drupal_cookie_parse__wrong_server(self): server_name = 'wrong_server_for_the_SESS.org' res = DrupalAuthMiddleware._drupal_cookie_parse(self.drupal_cookie, server_name) assert_equal(res, None)
def test_drupal_cookie_parse(self): res = DrupalAuthMiddleware._drupal_cookie_parse(self.drupal_cookie, self.environ['SERVER_NAME']) assert_equal(res, 'ae257e890935e0cc123ccc71797668e4')