@patch.object(views.Group.objects, 'search')
    def test_query_no_coords(self, mock_search):
        self.assertEqual(mock_search.call_count, 0)
        request = self.request_factory.get('/?q=something')
        request.user = self.user1
        self.view(request)
        self.assertEqual(
            mock_search.call_args,
            call(search=u'something', location=None)
        )
        self.assertEqual(mock_search.call_count, 1)
Only search is passed when search is in querystring.
dataset/ETHPy150Open ofa/connect/open_connect/groups/tests/test_views.py/GroupListViewTest.test_query_no_coords