def test_close(self): """Test close.""" yum_history = mock.create_autospec(dnf.yum.history.YumHistory) history = self._create_wrapper(yum_history) history.close() self.assertEqual(yum_history.close.mock_calls, [mock.call()])