Skip to content

Commit 71f00a1

Browse files
committed
Reenable no-body test
1 parent a31c1ef commit 71f00a1

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

tests/webservices_test.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -116,14 +116,14 @@ def test_400_error(self):
116116
'exception object contains expected code'
117117
)
118118

119-
# XXX - this test does not currently work with HTTPretty
120-
# def test_no_body_error(self):
121-
# httpretty.register_uri(httpretty.GET,
122-
# self.base_uri + 'country/' + '1.2.3.7',
123-
# status=400)
124-
# with self.assertRaisesRegex(GeoIP2HTTPError,
125-
# 'Received a 400 error for .* with no body'):
126-
# self.client.country('1.2.3.7')
119+
def test_no_body_error(self):
120+
httpretty.register_uri(httpretty.GET,
121+
self.base_uri + 'country/' + '1.2.3.7',
122+
body ='',
123+
status=400)
124+
with self.assertRaisesRegex(GeoIP2HTTPError,
125+
'Received a 400 error for .* with no body'):
126+
self.client.country('1.2.3.7')
127127

128128
def test_weird_body_error(self):
129129
httpretty.register_uri(httpretty.GET,

0 commit comments

Comments
 (0)