Пример #1
0
 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)
Пример #2
0
def render_search_form():
    form = BasicSearchForm()
    return {
        'form': form,
    }
Пример #3
0
 def test_basic_search(self):
     data = {'q': 'foobar', }
     form = BasicSearchForm(data)
     self.assertEqual(form.is_valid(), True)