Example #1
0
    def test_it_returns_filtered_orgs(self, orgs, pyramid_request, query, expected_orgs):
        if query:
            pyramid_request.GET['q'] = query

        ctx = index(None, pyramid_request)

        filtered_orgs = sorted([org.name for org in ctx['results']])
        assert filtered_orgs == expected_orgs
Example #2
0
    def test_it_returns_filtered_orgs(self, pyramid_request, query, expected_orgs):
        if query:
            pyramid_request.GET["q"] = query

        response = index(None, pyramid_request)

        filtered_orgs = sorted([org.name for org in response["results"]])
        assert filtered_orgs == expected_orgs