예제 #1
0
    def search(self, q, flagged=False, rereview=False):
        get_query = {"q": q, "queue_type": ("rereview" if rereview else "flagged" if flagged else "")}

        request = amo.tests.req_factory_factory(
            reverse("editors.themes.search"), user=UserProfile.objects.get(username="******")
        )
        request.GET = get_query
        return json.loads(themes_search(request).content)["objects"]
예제 #2
0
    def search(self, q, flagged=False, rereview=False):
        get_query = {'q': q, 'queue_type': ('rereview' if rereview else
                                            'flagged' if flagged else '')}

        request = amo.tests.req_factory_factory(
            reverse('editors.themes.search'),
            user=UserProfile.objects.get(username='******'))
        request.GET = get_query
        return json.loads(themes_search(request).content)['objects']
예제 #3
0
    def search(self, q, flagged=False, rereview=False):
        get_query = {'q': q, 'queue_type': ('rereview' if rereview else
                                            'flagged' if flagged else '')}

        request = amo.tests.req_factory_factory(
            reverse('editors.themes.list'),
            user=UserProfile.objects.get(username='******'))
        request.GET = get_query
        return json.loads(themes_search(request).content)['objects']