@@ -412,19 +412,24 @@ StyledItem {
412412 }
413413
414414 function test_changingSessionSticksToUser() {
415− LightDM.Sessions.mock.sessionMode = "full";
415+ LightDMController.sessionMode = "full";
416+ // For this test to work, a user has to be selected and the
417+ // mock must be made aware of that user
418+ selectUser("has-password")
419+ LightDMController.currentUsername = "has-password"
420+
416421 var loginList = findChild(view, "loginList");
417422 var fakeSessionName = "ASessionWillNeverBeCalledThis";
418423
419424 compare(LightDM.Sessions.count > 1, true);
420425 compare(loginList.currentSession != fakeSessionName, true);
421426
422− LightDM.Users.mock.sessionName = fakeSessionName;
427+ LightDMController.sessionName = fakeSessionName;
423428 tryCompare(loginList, "currentSession", fakeSessionName);
424429
425430 // Force a model reset
426− LightDM.Users.mock.userMode = "single";
427− LightDM.Users.mock.userMode = "full";
431+ LightDMController.userMode = "single";
432+ LightDMController.userMode = "full";
428433 }
429434
430435 function test_tease_data() {