@httprettified
    def test_get_most_rated_items(self):
        HTTPretty.register_uri(HTTPretty.GET, "http://some.com/api/1.0/json/itemtypes",
                           body='{"itemTypes": {"itemType": ["ITEM", "LUBE"]}}',
                           content_type="application/json")
        product = G(Product, parent=None)

        params = {
            "max_results": 1,
            "requested_item_type": "ITEM",
            "time_range": 'week'
        }

        expected_get_params = {
            "tenantid": ["tenant"],
            "apikey": ["key"],
            "numberOfResults": ["1"],
            "requesteditemtype": ["ITEM"],
            "timeRange": ["WEEK"]
        }
        expected_response = product.upc % '{"recommendeditems": {"item": [{"id": %s}]}}'
        HTTPretty.register_uri(HTTPretty.GET, "http://some.com/api/1.0/json/mostrateditems",
                           body=expected_response,
                           content_type="application/json")

        response = self.gateway.get_most_rated_items(**params)
        get_params = HTTPretty.last_request.querystring
        self.assertEqual(get_params, expected_get_params)
        self.assertEqual(len(response), 1)
        self.assertEqual(response[0]['product'].upc, product.upc)
dataset/ETHPy150Open snowball-one/django-oscar-easyrec/tests/gateway_tests.py/GatewayTest.test_get_most_rated_items/swapped operands of `%`