Skip to content

Commit

Permalink
fix for reportjson test
Browse files Browse the repository at this point in the history
  • Loading branch information
savon-noir committed Nov 28, 2020
1 parent 881474d commit f42fbbb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion examples/proc_nmap_like.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ def do_scan(targets, options):
rc = nmproc.run()
if rc != 0:
print("nmap scan failed: {0}".format(nmproc.stderr))
print(type(nmproc.stdout))

try:
parsed = NmapParser.parse(nmproc.stdout)
Expand Down
4 changes: 2 additions & 2 deletions libnmap/test/test_reportjson.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ def setUp(self):

def test_reportencode(self):
nmap_report_obj = NmapParser.parse_fromfile(self.xml_ref_file)
nmap_report_json = json.dumps(nmap_report_obj, cls=ReportEncoder)
nmap_report_json = json.loads(json.dumps(nmap_report_obj, cls=ReportEncoder))
with open(self.json_ref_file, 'r') as fd:
nmap_report_json_ref = json.dumps(json.load(fd))
nmap_report_json_ref = json.load(fd)
self.assertEqual(nmap_report_json_ref, nmap_report_json)

def test_reportdecode(self):
Expand Down

0 comments on commit f42fbbb

Please sign in to comment.