def test_creation_noop(self):
        self._mock_external_dict([('supported', '192.168.0.2/24')])
        es = self.create_external_segment(
            name='supported', cidr='192.168.0.0/24',
            external_routes=[], expected_res_status=201)['external_segment']

        self.create_external_policy(
            name=APIC_EXTERNAL_EPG,
            external_segments=[es['id']], expected_res_status=201)
        # Verify called with default route always
        mgr = self.driver.apic_manager
        if self.nat_enabled and not self.pre_l3out:
            mgr.ensure_external_epg_created.assert_called_once_with(
                es['id'], subnet='0.0.0.0/0',
                external_epg=(es['id'] % "default-%s"), owner=es['tenant_id'],
                transaction=mock.ANY)
        else:
            self.assertFalse(mgr.ensure_external_epg_created.called)

        mgr.ensure_external_epg_created.reset_mock()
        es = self.create_external_segment(
            name='unsupported', cidr='192.168.0.0/24', expected_res_status=201,
            external_routes=[{'destination': '128.0.0.0/16',
                              'nexthop': '192.168.0.254'}])['external_segment']

        self.create_external_policy(
            external_segments=[es['id']], expected_res_status=201)
        # Verify noop on unsupported
        self.assertFalse(mgr.ensure_external_epg_created.called)
dataset/ETHPy150Open openstack/group-based-policy/gbpservice/neutron/tests/unit/services/grouppolicy/test_apic_mapping.py/TestExternalPolicy.test_creation_noop/swapped operands of `%`