@@ -153,7 +153,6 @@ class UnityTestCase(AutopilotTestCase):
153153 self.useFixture(toolkit_fixtures.HideUnity7Launcher())
154154
155155 self._proxy = None
156− self._lightdm_mock_type = None
157156 self._qml_mock_enabled = True
158157 self._data_dirs_mock_enabled = True
159158 self._environment = {}
@@ -265,8 +264,7 @@ class UnityTestCase(AutopilotTestCase):
265264 binary_path
266265 )
267266
268− if self._lightdm_mock_type is None:
269− self.patch_lightdm_mock()
267+ self.patch_lightdm_mock()
270268
271269 if self._qml_mock_enabled:
272270 self._environment['QML2_IMPORT_PATH'] = (
@@ -338,12 +336,11 @@ class UnityTestCase(AutopilotTestCase):
338336 if data_dirs is not None:
339337 self._environment['XDG_DATA_DIRS'] = data_dirs
340338
341− def patch_lightdm_mock(self, mock_type='single'):
342− self._lightdm_mock_type = mock_type
343− logger.info("Setting up LightDM mock type '%s'", mock_type)
339+ def patch_lightdm_mock(self):
340+ logger.info("Setting up LightDM mock lib")
344341 new_ld_library_path = [
345342 get_default_extra_mock_libraries(),
346− self._get_lightdm_mock_path(mock_type)
343+ self._get_lightdm_mock_path()
347344 ]
348345 if os.getenv('LD_LIBRARY_PATH') is not None:
349346 new_ld_library_path.append(os.getenv('LD_LIBRARY_PATH'))
@@ -353,16 +350,16 @@ class UnityTestCase(AutopilotTestCase):
353350
354351 self._environment['LD_LIBRARY_PATH'] = new_ld_library_path
355352
356− def _get_lightdm_mock_path(self, mock_type):
353+ def _get_lightdm_mock_path(self):
357354 lib_path = get_mocks_library_path()
358355 lightdm_mock_path = os.path.abspath(
359− os.path.join(lib_path, "LightDM", mock_type)
356+ os.path.join(lib_path, "LightDM", "liblightdm")
360357 )
361358
362359 if not os.path.exists(lightdm_mock_path):
363360 raise RuntimeError(
364− "LightDM mock '%s' does not exist at path '%s'."
365− % (mock_type, lightdm_mock_path)
361+ "LightDM mock does not exist at path '%s'."
362+ % (lightdm_mock_path)
366363 )
367364 return lightdm_mock_path
368365