def test_get_description(self): endpoint = Endpoint(doc, '/hello/') description = endpoint.get_description() self.assertEquals( 'Return list of spikes for given host', description, )
def test_mounted_base_endpoint(self): endpoint = Endpoint(doc, '/hello/') self.assertEquals('./hello/?foo=bar', endpoint.get_link_path( request_path='/mount/path/', params={'foo': 'bar'}, )) self.assertEquals('./hello/', endpoint.get_display_path( request_path='/mount/path/', ))
def test_api_endpoint(self): endpoint = Endpoint(doc, '/hello/') self.assertEquals( './?foo=bar', endpoint.get_link_path( request_path='/hello/', params={'foo': 'bar'}, )) self.assertEquals('./', endpoint.get_display_path(request_path='/hello/', ))
def test_get_params(self): endpoint = Endpoint(doc, '/hello/') params = endpoint.get_params() print params