コード例 #1
0
 def setUp(self):
     self.base_path = 'testdata/instagram/'
     self.base_url = "https://graph.facebook.com/"
     self.version = pyfacebook.InstagramApi.VALID_API_VERSIONS[-1]
     self.api = pyfacebook.InstagramApi(
         long_term_token='testToken',
         instagram_business_id='17841400455970028',
     )
コード例 #2
0
    def setUp(self):
        self.instagram_business_id = 'test'
        self.test_username = '******'
        responses.add(method=responses.GET,
                      url=DEFAULT_GRAPH_URL + DEFAULT_GRAPH_VERSION +
                      '/oauth/access_token',
                      json={'access_token': 'testToken'})

        self.api = pyfacebook.InstagramApi(
            app_id='test',
            app_secret='test',
            short_token='test',
            version='3.2',
            timeout=1,
            interval_between_request=1,
            sleep_on_rate_limit=True,
            instagram_business_id=self.instagram_business_id)
コード例 #3
0
 def testInitApiWithOutParams(self):
     self.assertRaises(pyfacebook.PyFacebookError,
                       lambda: pyfacebook.InstagramApi())