File tree Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Original file line number Diff line number Diff line change 33import os
44from io import open
55from typing import Type , Union
6- import pytest_httpserver
6+ from pytest_httpserver import HTTPServer
77import pytest
88
99from minfraud .errors import (
@@ -24,7 +24,7 @@ class BaseTest(unittest.TestCase):
2424 client_class : Union [Type [AsyncClient ], Type [Client ]] = Client
2525
2626 @pytest .fixture (autouse = True )
27- def setup_httpserver (self , httpserver : pytest_httpserver . HTTPServer ):
27+ def setup_httpserver (self , httpserver : HTTPServer ):
2828 self .httpserver = httpserver
2929
3030 def setUp (self ):
@@ -217,17 +217,14 @@ def test_200_with_email_hashing(self):
217217 def custom_handler (r ):
218218 nonlocal last
219219 last = r
220- return "hello world"
220+ return '{"status": 204}'
221221
222222 self .httpserver .expect_request (uri , method = "POST" ).respond_with_handler (
223223 custom_handler
224224 )
225225
226226 request = {"email" : {"address" : "Test+ignore@maxmind.com" }}
227- try :
228- self .run_client (getattr (self .client , self .type )(request , hash_email = True ))
229- except Exception as e :
230- pass
227+ self .run_client (getattr (self .client , self .type )(request , hash_email = True ))
231228
232229 self .assertEqual (
233230 {
You can’t perform that action at this time.
0 commit comments