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)
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)
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)
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)
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)
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)