def search(request): text = request.GET['text'] results = searching.search(text, request.dependencies) return {'images':results, 'searchtext':text}
def search(request): text = request.GET['text'] results = searching.search(text, request.dependencies) return {'images': results, 'searchtext': text}
def test_Search_delegates_to_repository(self): from niprov.searching import search results = search('one day', dependencies=self.dependencies) self.repo.search.assert_called_with('one day') self.assertEqual(results, self.repo.search())