Exemplo n.º 1
0
 def test_remove_package_error_should_fail(self, mock_rmdir, *args):
     storage = InstallationStorage()
     mock_pkg = mock.Mock()
     mock_pkg.pkg_id = 'test'
     with pytest.raises(RCRemoveError):
         storage.remove_package(mock_pkg)
Exemplo n.º 2
0
 def test_remove_package_should_remove_dir(self, mock_rmdir, *args):
     storage = InstallationStorage()
     mock_pkg = mock.Mock()
     mock_pkg.pkg_id = 'test'
     storage.remove_package(mock_pkg)
     mock_rmdir.assert_called_once()