From 14335e49609a8bb61e051f1012e9bd202bff35b9 Mon Sep 17 00:00:00 2001 From: guanana Date: Sun, 13 Dec 2020 20:25:14 +0000 Subject: [PATCH] Update unittest for nmap module --- tests/test_nmap.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/test_nmap.py b/tests/test_nmap.py index 3a1e4fd..9a6659e 100644 --- a/tests/test_nmap.py +++ b/tests/test_nmap.py @@ -1,16 +1,17 @@ import unittest -from os import environ + from nbs.nmap import Nmap class TestRequest(unittest.TestCase): def test_api(self): - path = environ.get('NMAP_PATH') - nmap = Nmap(path, 'test') + nmap = Nmap("test", ["127.0.0.1/32"]) self.assertIsInstance(nmap, Nmap) nmap.run() self.assertIsInstance(nmap.hosts, list) + self.assertEqual(nmap.hosts[0][0], "127.0.0.1") + self.assertEqual(nmap.hosts[0][1], "localhost") if __name__ == '__main__':