diff --git a/unittests/test_cfood.py b/unittests/test_cfood.py index 62e4b114a1c5cd8f3631f774637f3876c545afd3..e2f15ffdc7929fbd67aee37bccdb0f44cacef104 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 360d4b28938492d0f2af6d696e39dffb1cc3fead..354f70d242a74197819642a76dc059ff8ed9adb0 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 71408fa6e34f17f18a803e00e944ef9105eae311..c9e6812b479a1af9c9487d5a4ca944c8f1a4a756 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())