Exemplo n.º 1
0
 def test_returns_false_when_user_agent_does_not_match_lists(self):
     self.request.META = {'HTTP_USER_AGENT': 'chrome'}
     self.assertFalse(is_mobile(self.request))
Exemplo n.º 2
0
 def test_returns_true_when_user_agent_matches_iphone(self):
     self.request.META = {'HTTP_USER_AGENT': 'iphone'}
     self.assertTrue(is_mobile(self.request))