Skip to content
Snippets Groups Projects
Commit 40044dff authored by Henrik tom Wörden's avatar Henrik tom Wörden
Browse files

imports'

parent 1c743873
No related branches found
No related tags found
No related merge requests found
Pipeline #41174 failed
......@@ -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
......
......@@ -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())
......
......@@ -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())
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment