def test_logout(self):
    """Tests when logging out with and without continue URL."""
    host = 'foo.com:1234'
    path_info = '/_ah/login'
    cookie_dict = {'dev_appserver_login': '%s:False:%s' % (EMAIL, USER_ID)}
    action = 'Logout'
    set_email = ''
    set_admin = False
    continue_url = ''

    expected_set = login._clear_user_info_cookie().strip()

    # No continue URL.
    status, location, set_cookie, _ = self._run_test(
        host, path_info, cookie_dict, action, set_email, set_admin,
        continue_url)
    self.assertEqual(302, status)
    self.assertEqual((host, path_info) % 'http://%s%s', location)
    self.assertEqual(expected_set, set_cookie)
    self.assertIsInstance(location, str)
    self.assertIsInstance(set_cookie, str)

    # Continue URL.
    continue_url = 'http://foo.com/blah'
    status, location, set_cookie, _ = self._run_test(
        host, path_info, cookie_dict, action, set_email, set_admin,
        continue_url)
    self.assertEqual(302, status)
    self.assertEqual(continue_url, location)
    self.assertEqual(expected_set, set_cookie)
    self.assertIsInstance(location, str)
    self.assertIsInstance(set_cookie, str)
dataset/ETHPy150Open AppScale/appscale/AppServer/google/appengine/tools/devappserver2/login_test.py/LoginPageTest.test_logout/swapped operands of `%`