'Test the generic SearchView form is valid.'

def test_search_view_form_valid(self):

    v = SearchView()
    v.kwargs = {}
    v.request = self.request
    form = v.get_form(v.get_form_class())
    response = v.form_valid(form)
    context = response.context_data
    self.assertEqual(context[u'query'], self.query)
