mirror of https://github.com/MISP/misp-modules
chg: [internal] Show whole error for invalid object
parent
3bd07b2f8a
commit
1bdd96e44f
|
@ -54,7 +54,8 @@ class TestExpansions(unittest.TestCase):
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def get_object(response):
|
def get_object(response):
|
||||||
data = response.json()
|
data = response.json()
|
||||||
if not isinstance(data, dict):
|
if not isinstance(data, dict) or 'results' not in data:
|
||||||
|
# Unexpected result
|
||||||
print(json.dumps(data, indent=2))
|
print(json.dumps(data, indent=2))
|
||||||
return data
|
return data
|
||||||
return data['results']['Object'][0]['name']
|
return data['results']['Object'][0]['name']
|
||||||
|
|
Loading…
Reference in New Issue