From 40044dff3e1f0c0176657d220269e76a82738a1e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20tom=20W=C3=B6rden?= <h.tomwoerden@indiscale.com> Date: Tue, 26 Sep 2023 22:17:07 +0200 Subject: [PATCH] imports' --- unittests/test_cfood.py | 2 +- unittests/test_h5.py | 5 +++-- unittests/test_sss_helper.py | 5 +++-- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/unittests/test_cfood.py b/unittests/test_cfood.py index 62e4b114..e2f15ffd 100644 --- a/unittests/test_cfood.py +++ b/unittests/test_cfood.py @@ -32,7 +32,7 @@ from caosadvancedtools.cfood import (AbstractCFood, AbstractFileCFood, CMeal, get_entity_for_path) from caosadvancedtools.crawler import FileCrawler from caosadvancedtools.example_cfood import ExampleCFood -from caosdb.common.models import _parse_single_xml_element +from linkahead.common.models import _parse_single_xml_element from lxml import etree from datetime import datetime, timezone diff --git a/unittests/test_h5.py b/unittests/test_h5.py index 360d4b28..354f70d2 100644 --- a/unittests/test_h5.py +++ b/unittests/test_h5.py @@ -2,6 +2,7 @@ import unittest from tempfile import NamedTemporaryFile import caosdb as db +import linkahead import caosdb.apiutils import h5py import numpy as np @@ -77,8 +78,8 @@ class H5CFoodTest(unittest.TestCase): # TODO this does probably break the code: The function will not be # restored correctly. # Change it to use the BaseMockUpTest - real_retrieve = caosdb.apiutils.retrieve_entity_with_id - caosdb.apiutils.retrieve_entity_with_id = dummy_get + real_retrieve = linkahead.apiutils.retrieve_entity_with_id + linkahead.apiutils.retrieve_entity_with_id = dummy_get # should run without problem h5.collect_existing_structure(db.Record(), db.Record(id=234), h5.EntityMapping()) diff --git a/unittests/test_sss_helper.py b/unittests/test_sss_helper.py index 71408fa6..c9e6812b 100644 --- a/unittests/test_sss_helper.py +++ b/unittests/test_sss_helper.py @@ -4,6 +4,7 @@ from os import listdir, remove from os.path import abspath, dirname, exists, isfile, join import caosdb as db +import linkahead as la from caosadvancedtools.serverside.helper import (NameCollector, get_data, get_file_via_download, init_data_model, @@ -110,8 +111,8 @@ def test_get_file_via_download(): # TODO test whether something ends up in the logger class NotThere(DummyFile): def download(*args, **kwargs): - raise db.CaosDBException() - with raises(db.CaosDBException): + raise la.LinkAheadException() + with raises(la.LinkAheadException): get_file_via_download(Inconsistent()) -- GitLab