def test_cookies(self):
    self.headers.append(('set-cookie', '_x=1; path=/; httponly'))
    self.client.get('auth/token')
    assert self.client.cookies
    assert ('1' == self.client.cookies['_x'])
    self.headers.append(('set-cookie', '_x=; path=/; httponly'))
    self.client.get('auth/token')
    assert (not self.client.cookies)
def test_cookies(self):
    self.headers.append(('set-cookie', '_x=1; path=/; httponly'))
    self.client.get('auth/token')
    assert self.client.cookies
    assert ('1' == self.client.cookies['_x'])
    self.headers.append(('set-cookie', '_x=; path=/; httponly'))
    self.client.get('auth/token')
    assert (not self.client.cookies)