'This tests executes a method in the DataMotionMixin.'

@ddt.data({'secondary_id': 'dev0', 'configured_targets': ['dev1']}, {'secondary_id': 'dev3', 'configured_targets': ['dev1', 'dev2']}, {'secondary_id': 'dev1', 'configured_targets': []}, {'secondary_id': None, 'configured_targets': []})
@ddt.unpack
def test_failover_host_invalid_replication_target(self, secondary_id, configured_targets):

    self.driver.backend_name = 'dev0'
    self.mock_object(data_motion.DataMotionMixin, 'get_replication_backend_names', return_value=configured_targets)
    complete_failover_call = self.mock_object(data_motion.DataMotionMixin, '_complete_failover')
    self.assertRaises(exception.InvalidReplicationTarget, self.driver.failover_host, 'fake_context', [], secondary_id=secondary_id)
    self.assertFalse(complete_failover_call.called)
