def test_end_resources(self):
        class Api(Client):
            def set_format(self, fmt):
                self._format = fmt
            def build_request(self, resource, query):
                resource = "%s.%s" % (resource, self._format)
                return resource, query

        api = Api(TEST_SERVER)
        api.set_format("json")
        result = api.tests.list(foo="bar")
        self.assertEqual(result, 'bar')
        self.assertEqual(api._last_response.final_url, TEST_SERVER+"/tests/list.json?foo=bar")
        api.set_format("xml")
        result = api.tests.list(foo="arg")
        self.assertEqual(api._last_response.final_url, TEST_SERVER+"/tests/list.xml?foo=arg")
/tests/list.json?foo=bar
dataset/ETHPy150Open namlook/apibee/tests/test_client.py/ClientTestCase.test_end_resources