def test__restore_events(self, mock_events):
        """Test restoring disabled events."""

        mock_event1 = MagicMock(spec=HoudiniEvent)
        mock_enabled1 = PropertyMock(return_value=False)
        type(mock_event1).enabled = mock_enabled1

        mock_event2 = MagicMock(spec=HoudiniEvent)
        mock_enabled2 = PropertyMock(return_value=False)
        type(mock_event2).enabled = mock_enabled2

        mock_events.return_value = {
            mock_event1.name: mock_event1,
            mock_event2.name: mock_event2,
        }

        mock_states = MagicMock(spec=dict)

        states = {mock_event1.name: False, mock_event2.name: True}
        mock_states.items.return_value = states.items()

        manager = ht.events.manager.HoudiniEventManager()
        manager._event_states = mock_states

        manager._restore_events()

        # Event 1's enable should have been set to False, 2's True
        mock_enabled1.assert_has_calls([call(False)])
        mock_enabled2.assert_has_calls([call(True)])

        mock_states.clear.assert_called_once()
    def test__restore_events(self, mock_events):
        """Test restoring disabled events."""

        mock_event1 = MagicMock(spec=HoudiniEvent)
        mock_enabled1 = PropertyMock(return_value=False)
        type(mock_event1).enabled = mock_enabled1

        mock_event2 = MagicMock(spec=HoudiniEvent)
        mock_enabled2 = PropertyMock(return_value=False)
        type(mock_event2).enabled = mock_enabled2

        mock_events.return_value = {
            mock_event1.name: mock_event1,
            mock_event2.name: mock_event2,
        }

        mock_states = MagicMock(spec=dict)

        states = {mock_event1.name: False, mock_event2.name: True}
        mock_states.iteritems.return_value = states.iteritems()

        manager = ht.events.manager.HoudiniEventManager()
        manager._event_states = mock_states

        manager._restore_events()

        # Event 1's enable should have been set to False, 2's True
        mock_enabled1.assert_has_calls([call(False)])
        mock_enabled2.assert_has_calls([call(True)])

        mock_states.clear.assert_called_once()