'Ensure that CookieStorage honors SESSION_COOKIE_DOMAIN.
Refs #15618.'

def test_domain(self):

    storage = self.get_storage()
    response = self.get_response()
    storage.add(constants.INFO, 'test')
    storage.update(response)
    self.assertTrue(('test' in response.cookies['messages'].value))
    self.assertEqual(response.cookies['messages']['domain'], '.lawrence.com')
    self.assertEqual(response.cookies['messages']['expires'], '')
    storage = self.get_storage()
    response = self.get_response()
    storage.add(constants.INFO, 'test')
    for m in storage:
        pass
    storage.update(response)
    self.assertEqual(response.cookies['messages'].value, '')
    self.assertEqual(response.cookies['messages']['domain'], '.lawrence.com')
    self.assertEqual(response.cookies['messages']['expires'], 'Thu,    01-Jan-1970    00:00:00    GMT')
