mirror of
https://github.com/byt3bl33d3r/MITMf.git
synced 2025-07-06 21:12:16 -07:00
trying some new tests out
This commit is contained in:
parent
27c28e512e
commit
db5b65c463
2 changed files with 17 additions and 5 deletions
|
@ -1,11 +1,23 @@
|
||||||
import unittest
|
import unittest
|
||||||
from commands import getstatusoutput
|
import logging
|
||||||
|
|
||||||
class BasicTests(unittest.TestCase):
|
class BasicTests(unittest.TestCase):
|
||||||
|
|
||||||
def test_exec(self):
|
def test_configfile(self):
|
||||||
status, res = getstatusoutput('sudo python mitmf.py --help')
|
from configobj import ConfigObj
|
||||||
self.assertEqual(0, status, msg=res)
|
config = ConfigObj('config/mitmf.conf')
|
||||||
|
|
||||||
|
def test_logger(self):
|
||||||
|
from core.logger import logger
|
||||||
|
logger.log_level = logging.DEBUG
|
||||||
|
formatter = logging.Formatter("%(asctime)s [unittest] %(message)s", datefmt="%Y-%m-%d %H:%M:%S")
|
||||||
|
log = logger().setup_logger("unittest", formatter)
|
||||||
|
|
||||||
|
def test_DNSChef(self):
|
||||||
|
from core.logger import logger
|
||||||
|
logger.log_level = logging.DEBUG
|
||||||
|
from core.servers.DNS import DNSChef
|
||||||
|
DNSChef().start()
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
unittest.main()
|
unittest.main()
|
Loading…
Add table
Add a link
Reference in a new issue