def url(self): """ The relative url to the graph api. :rtype: str """ return force_slash_prefix(self.graph_version) + force_slash_prefix( self.endpoint)
def test_empty_endpoint_url(self): request = FacebookRequest(endpoint='') self.assertEqual(request.url, force_slash_prefix(DEFAULT_GRAPH_VERSION) + '/')
def test_endpoint_with_access_token(self): request = FacebookRequest(endpoint='/foo?access_token=foo_token') self.assertEqual(request.url, force_slash_prefix(DEFAULT_GRAPH_VERSION) + '/foo') self.assertEqual(request.access_token, 'foo_token')