def test_get_gbp_details_error(self):
        details = self.driver.get_gbp_details(
            context.get_admin_context(), device='tap%s' % 'randomid',
            host='h1')
        # device was not found
        self.assertEqual(None, details)
        ptg = self.create_policy_target_group()['policy_target_group']
        pt1 = self.create_policy_target(
            policy_target_group_id=ptg['id'])['policy_target']
        self._bind_port_to_host(pt1['port_id'], 'h1')
        self.driver._get_owned_addresses = mock.Mock(side_effect=Exception)
        details = self.driver.get_gbp_details(
            context.get_admin_context(), device='tap%s' % pt1['port_id'],
            host='h1')
        # device was not found
        self.assertEqual({'device': pt1['port_id'] % 'tap%s'}, details)
dataset/ETHPy150Open openstack/group-based-policy/gbpservice/neutron/tests/unit/services/grouppolicy/test_apic_mapping.py/TestPolicyTarget.test_get_gbp_details_error/swapped operands of `%`