def test_frame_filter_with_mac_filtering(self):
        """
        Tests the frame filter when some MAC addresses need to be filtered.
        """

        config = Config()
        config.mac_filters = ["a4:77:33:9a:73:5c", "b0:05:94:5d:5a:4d"]
        frame_filter = config.generate_frame_filter()

        self.assertEqual(
            frame_filter, "type mgt subtype probe-req" +
            " and (ether src host a4:77:33:9a:73:5c" +
            "|| ether src host b0:05:94:5d:5a:4d)")
Exemplo n.º 2
0
    def test_frame_filter_with_mac_filtering(self):
        """
        Tests the frame filter when some MAC addresses need to be filtered.
        """

        config = Config()
        config.mac_filters = ["a4:77:33:9a:73:5c", "b0:05:94:5d:5a:4d"]

        with self.assertLogs(self.logger, level=logging.DEBUG):
            self.assertEqual(
                config.frame_filter,
                "type mgt subtype probe-req" +
                " and (ether src host a4:77:33:9a:73:5c" +
                "|| ether src host b0:05:94:5d:5a:4d)"
            )