Beispiel #1
0
 def test_returns_false_when_user_does_not_have_no_mobile_cookie(self):
     request = mock.Mock(spec=HttpRequest)
     request.COOKIES = {}
     self.assertFalse(utilities.user_declined_mobile(request))
Beispiel #2
0
 def test_returns_false_when_user_does_not_have_no_mobile_cookie(self):
     request = mock.Mock(spec=HttpRequest)
     request.COOKIES = {}
     self.assertFalse(utilities.user_declined_mobile(request))
Beispiel #3
0
 def test_returns_true_when_user_has_no_mobile_cookie(self):
     request = mock.Mock(spec=HttpRequest)
     request.COOKIES = {'no_mobile': 'True'}
     self.assertTrue(utilities.user_declined_mobile(request))
Beispiel #4
0
 def test_returns_true_when_user_has_no_mobile_cookie(self):
     request = mock.Mock(spec=HttpRequest)
     request.COOKIES = {'no_mobile': 'True'}
     self.assertTrue(utilities.user_declined_mobile(request))