@@ -37,7 +37,7 @@ def setUp(self):
37
37
38
38
def test_metadata_query (self ):
39
39
with open (METADATA_QUERY_SUCCESS , 'rb' ) as f :
40
- response_json = json .load ( f )
40
+ response_json = json .loads ( f . read (). decode () )
41
41
with requests_mock .mock () as m :
42
42
m .post (self .baseurl , json = response_json )
43
43
actual = self .server .metadata .query ('fake query' )
@@ -48,7 +48,7 @@ def test_metadata_query(self):
48
48
49
49
def test_metadata_query_ignore_error (self ):
50
50
with open (METADATA_QUERY_ERROR , 'rb' ) as f :
51
- response_json = json .load ( f )
51
+ response_json = json .loads ( f . read (). decode () )
52
52
with requests_mock .mock () as m :
53
53
m .post (self .baseurl , json = response_json )
54
54
actual = self .server .metadata .query ('fake query' )
@@ -60,7 +60,7 @@ def test_metadata_query_ignore_error(self):
60
60
61
61
def test_metadata_query_abort_on_error (self ):
62
62
with open (METADATA_QUERY_ERROR , 'rb' ) as f :
63
- response_json = json .load ( f )
63
+ response_json = json .loads ( f . read (). decode () )
64
64
with requests_mock .mock () as m :
65
65
m .post (self .baseurl , json = response_json )
66
66
0 commit comments