def test_get_form_kwargs(self):
        """Test getting the search view form kwargs."""
        v = SearchView()
        v.request = self.request

        form_kwargs = v.get_form_kwargs()
        self.assertEqual(form_kwargs.get('data').get('q'), self.query)
        self.assertEqual(form_kwargs.get('initial'), {})
        self.assertTrue('searchqueryset' in form_kwargs)
Example #2
0
    def test_get_form_kwargs(self):
        """Test getting the search view form kwargs."""
        v = SearchView()
        v.request = self.request

        form_kwargs = v.get_form_kwargs()
        self.assertEqual(form_kwargs.get('data').get('q'), self.query)
        self.assertEqual(form_kwargs.get('initial'), {})
        self.assertTrue('searchqueryset' in form_kwargs)
    def test_get_form_kwargs(self):
        """Test getting the search view form kwargs."""
        v = SearchView()
        v.request = self.request

        form_kwargs = v.get_form_kwargs()
        self.assertEqual(form_kwargs.get("data").get("q"), self.query)
        self.assertEqual(form_kwargs.get("initial"), {})
        self.assertTrue("searchqueryset" in form_kwargs)
        self.assertTrue("load_all" in form_kwargs)
    def test_get_form_kwargs(self):
        """Test getting the search view form kwargs."""
        v = SearchView()
        v.request = self.request

        form_kwargs = v.get_form_kwargs()
        self.assertEqual(form_kwargs.get("data").get("q"), self.query)
        self.assertEqual(form_kwargs.get("initial"), {})
        self.assertTrue("searchqueryset" in form_kwargs)
        self.assertTrue("load_all" in form_kwargs)