def _test_add_and_remove_chain_custom_binary_name_helper(self, use_ipv6):
        bn = ("xbcdef" * 5)

        self.iptables = iptables_manager.IptablesManager(
            binary_name=bn,
            use_ipv6=use_ipv6)
        self.execute = mock.patch.object(self.iptables, "execute").start()

        iptables_args = {'bn': bn[:16], 'filter_rules': ''}

        filter_dump = FILTER_WITH_RULES_TEMPLATE % iptables_args

        filter_dump_ipv6 = iptables_args % FILTER_TEMPLATE

        filter_dump_mod = filter_dump

        nat_dump = NAT_TEMPLATE % iptables_args

        raw_dump = _generate_raw_dump(iptables_args)
        mangle_dump = _generate_mangle_dump(iptables_args)

        expected_calls_and_values = [
            (mock.call(['iptables-save'],
                       run_as_root=True),
             ''),
            (mock.call(['iptables-restore', '-n'],
                       process_input=(filter_dump_mod + mangle_dump +
                                      nat_dump + raw_dump),
                       run_as_root=True),
             None),
            (mock.call(['iptables-save'],
                       run_as_root=True),
             ''),
            (mock.call(['iptables-restore', '-n'],
                       process_input=(filter_dump + mangle_dump +
                                      nat_dump + raw_dump),
                       run_as_root=True),
             None),
        ]
        if use_ipv6:
            mangle_dump_v6 = _generate_mangle_dump_v6(iptables_args)
            self._extend_with_ip6tables_filter(
                expected_calls_and_values,
                filter_dump_ipv6 + mangle_dump_v6 + raw_dump)

        tools.setup_mock_calls(self.execute, expected_calls_and_values)

        self.iptables.ipv4['filter'].add_chain('filter')
        self.iptables.apply()

        self.iptables.ipv4['filter'].empty_chain('filter')
        self.iptables.apply()

        tools.verify_mock_calls(self.execute, expected_calls_and_values)
dataset/ETHPy150Open openstack/neutron/neutron/tests/unit/agent/linux/test_iptables_manager.py/IptablesManagerStateFulTestCase._test_add_and_remove_chain_custom_binary_name_helper/swapped operands of `%`