1234567891011121314151617 |
- import unittest
- from definitions import ROOT_DIR
- import Core.Controller as Ctrl
- pcap = ROOT_DIR + "/../resources/test/reference_1998.pcap"
- controller = Ctrl.Controller(pcap_file_path=pcap, do_extra_tests=False, non_verbose=False)
- controller.load_pcap_statistics(flag_write_file=False, flag_recalculate_stats=True, flag_print_statistics=False)
- class UnitTestPyparsing(unittest.TestCase):
- def test_named_query(self):
- self.assertEqual(controller.statistics.process_db_query('least_used(portnumber)'),
- [58645, 59844])
- self.assertEqual(controller.statistics.process_db_query('most_used(portnumber)'),
- 443)
|