File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed
Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff 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 ,
You can’t perform that action at this time.
0 commit comments