Esempio n. 1
0
 def test_q_is_set_but_is_empty_should_return_true(self):
     request = construct_dummy_request(params={'q': ''})
     response = valid_q_parameter(request)
     self.assertFalse(response)
Esempio n. 2
0
 def test_q_is_set_but_is_not_escaped_should_return_true(self):
     request = construct_dummy_request(params={'q': '<foo'})
     response = valid_q_parameter(request)
     self.assertTrue(response)
Esempio n. 3
0
 def test_q_is_missing_should_return_false(self):
     request = construct_dummy_request(params={})
     response = valid_q_parameter(request)
     self.assertFalse(response)