def test_basic_search_invalid_too_short(self): data = {'q': 'a' * (settings.ST_SEARCH_QUERY_MIN_LEN - 1), } form = BasicSearchForm(data) self.assertEqual(form.is_valid(), False)
def render_search_form(): form = BasicSearchForm() return { 'form': form, }
def test_basic_search(self): data = {'q': 'foobar', } form = BasicSearchForm(data) self.assertEqual(form.is_valid(), True)