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_nested_query(self):
- self.assertEqual(controller.statistics.process_db_query('macaddress(ipaddress=most_used(ipaddress))'),
- '08:00:27:a3:83:43')
- self.assertEqual(controller.statistics.process_db_query('macaddress(ipaddress=least_used(ipaddress))'),
- '52:54:00:12:35:02')
|