'Test that enterprise cookies are deleted in login/registration views.
Cookies must be deleted in login/registration views so that *default* login/registration branding
is displayed to subsequent requests from non-enterprise customers.'

def test_enterprise_cookie_delete(self):

    cookies = SimpleCookie()
    cookies[settings.ENTERPRISE_CUSTOMER_COOKIE_NAME] = 'test-enterprise-customer'
    response = self.client.get(reverse('signin_user'), HTTP_ACCEPT='text/html', cookies=cookies)
    self.assertIn(settings.ENTERPRISE_CUSTOMER_COOKIE_NAME, response.cookies)
    enterprise_cookie = response.cookies[settings.ENTERPRISE_CUSTOMER_COOKIE_NAME]
    self.assertEqual(enterprise_cookie['domain'], settings.BASE_COOKIE_DOMAIN)
    self.assertEqual(enterprise_cookie.value, '')
