summaryrefslogtreecommitdiffstats
path: root/test/test_oauth.py
diff options
context:
space:
mode:
authorLibravatarUnit 193 <unit193@unit193.net>2020-08-15 17:48:11 -0400
committerLibravatarUnit 193 <unit193@unit193.net>2020-08-15 17:48:11 -0400
commit7cf59dc17c3607e096292462ed15d391be4e3dfd (patch)
tree50d2750e958f43271dc6cc5310211cf8f8bbd9d0 /test/test_oauth.py
parentba039cfb2e1ba2522ee0a0fa2a84a1a6579e4877 (diff)
New upstream version 1.14.4.upstream/1.14.4
Diffstat (limited to 'test/test_oauth.py')
-rw-r--r--test/test_oauth.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/test/test_oauth.py b/test/test_oauth.py
index e4664e4..7455928 100644
--- a/test/test_oauth.py
+++ b/test/test_oauth.py
@@ -15,7 +15,6 @@ sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
from gallery_dl import oauth, text # noqa E402
TESTSERVER = "http://term.ie/oauth/example"
-TESTSERVER = "http://term.ie/oauth/example"
CONSUMER_KEY = "key"
CONSUMER_SECRET = "secret"
REQUEST_TOKEN = "requestkey"
@@ -96,12 +95,17 @@ class TestOAuthSession(unittest.TestCase):
def _oauth_request(self, endpoint, params=None,
oauth_token=None, oauth_token_secret=None):
+ # the test server at 'term.ie' is unreachable
+ raise unittest.SkipTest()
+
session = oauth.OAuth1Session(
CONSUMER_KEY, CONSUMER_SECRET,
oauth_token, oauth_token_secret,
)
try:
- return session.get(TESTSERVER + endpoint, params=params).text
+ response = session.get(TESTSERVER + endpoint, params=params)
+ response.raise_for_status()
+ return response.text
except OSError:
raise unittest.SkipTest()