Skip to content
This repository was archived by the owner on May 7, 2024. It is now read-only.

Commit 34bcb1b

Browse files
committed
HTTPError can show up when you plan with the URL value
1 parent 7535d9a commit 34bcb1b

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

CloudFlare/tests/test_cloudflare_calls.py

+8-2
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,10 @@ def test_ips6_should_fail():
116116
try:
117117
ips = cf.ips()
118118
except CloudFlare.exceptions.CloudFlareAPIError as e:
119-
print('Error expected: %d %s' % (int(e), str(e)), file=sys.stderr)
119+
print('Error expected: %s %d %s' % (type(e).__name__, int(e), str(e)), file=sys.stderr)
120+
pass
121+
except Exception as e:
122+
print('Error expected: %s %s' % (type(e).__name__, e), file=sys.stderr)
120123
pass
121124

122125
def test_cloudflare_url_wrong():
@@ -130,7 +133,10 @@ def test_ips7_should_fail():
130133
try:
131134
ips = cf.ips()
132135
except CloudFlare.exceptions.CloudFlareAPIError as e:
133-
print('Error expected: %d %s' % (int(e), str(e)), file=sys.stderr)
136+
print('Error expected: %s %d %s' % (type(e).__name__, int(e), str(e)), file=sys.stderr)
137+
pass
138+
except Exception as e:
139+
print('Error expected: %s %s' % (type(e).__name__, e), file=sys.stderr)
134140
pass
135141

136142
def test_cloudflare_email_invalid():

0 commit comments

Comments
 (0)