'On login, set the SESSION_EXISTS_COOKIE.'

def test_login_sets_extra_cookie(self):

    url = reverse('users.login')
    res = self.client.post(url, {'username': self.user.username, 'password': 'testpass'})
    assert (settings.SESSION_EXISTS_COOKIE in res.cookies)
    c = res.cookies[settings.SESSION_EXISTS_COOKIE]
    assert ('secure' not in c.output().lower())
