'This tests executes a method in the DataMotionMixin.'

def test_failover_host(self):

    self.library.backend_name = 'dev0'
    self.mock_object(data_motion.DataMotionMixin, '_complete_failover', return_value=('dev1', []))
    self.mock_object(data_motion.DataMotionMixin, 'get_replication_backend_names', return_value=['dev1', 'dev2'])
    self.mock_object(self.library.ssc_library, 'get_ssc_flexvol_names', return_value=fake_utils.SSC.keys())
    self.mock_object(self.library, '_update_zapi_client')
    (actual_active, vol_updates, __) = self.library.failover_host('fake_context', [], secondary_id='dev1', groups=[])
    data_motion.DataMotionMixin._complete_failover.assert_called_once_with('dev0', ['dev1', 'dev2'], fake_utils.SSC.keys(), [], failover_target='dev1')
    self.library._update_zapi_client.assert_called_once_with('dev1')
    self.assertTrue(self.library.failed_over)
    self.assertEqual('dev1', self.library.failed_over_backend_name)
    self.assertEqual('dev1', actual_active)
    self.assertEqual([], vol_updates)
