def test_attach_interface(self, mock_attach_interface): driver = self._get_driver() driver.attach_interface('fake_context', 'fake_instance', 'fake_image_meta', 'fake_vif') mock_attach_interface.assert_called_once_with('fake_instance', 'fake_vif')