コード例 #1
0
ファイル: test_instagram.py プロジェクト: LennonFlores/bridgy
 def expect_instagram_fetch(self,
                            body=test_instagram.HTML_PROFILE_COMPLETE,
                            **kwargs):
     TestCase.expect_requests_get(self,
                                  gr_instagram.HTML_BASE_URL + 'snarfed/',
                                  body,
                                  allow_redirects=False,
                                  **kwargs)
コード例 #2
0
ファイル: test_instagram.py プロジェクト: LennonFlores/bridgy
    def expect_site_fetch(self, body=None):
        if body is None:
            body = """
<html><body>
<a rel="me" href="https://www.instagram.com/snarfed">me on insta</a>
</body></html>
"""
        TestCase.expect_requests_get(self, 'http://snarfed.org', body)
コード例 #3
0
  def expect_site_fetch(self, body=None):
    if body is None:
      body = """
<html><body>
<a rel="me" href="https://www.instagram.com/snarfed">me on insta</a>
</body></html>
"""
    TestCase.expect_requests_get(self, 'http://snarfed.org', body)
コード例 #4
0
    def expect_instagram_fetch(self, user=PROFILE_USER, **kwargs):
        html = ''
        if user:
            profile = copy.deepcopy(gr_test_instagram.HTML_PROFILE)
            instagram_profile_user(profile).clear()
            instagram_profile_user(profile).update(user)
            html = (gr_test_instagram.HTML_HEADER + json_dumps(profile) +
                    gr_test_instagram.HTML_FOOTER)

        return TestCase.expect_requests_get(self,
                                            gr_instagram.HTML_BASE_URL +
                                            'snarfed/',
                                            html,
                                            allow_redirects=False,
                                            **kwargs)
コード例 #5
0
ファイル: test_instagram.py プロジェクト: mblaney/bridgy
 def expect_instagram_fetch(self, body=test_instagram.HTML_PROFILE_COMPLETE,
                            **kwargs):
   TestCase.expect_requests_get(self, gr_instagram.HTML_BASE_URL + 'snarfed/',
                                body, allow_redirects=False, **kwargs)
コード例 #6
0
ファイル: test_instagram.py プロジェクト: chrisaldrich/bridgy
 def expect_instagram_fetch(self, body=test_instagram.HTML_PROFILE_COMPLETE,
                            **kwargs):
   TestCase.expect_requests_get(self, 'https://www.instagram.com/snarfed/',
                                body, allow_redirects=False, **kwargs)