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, ...@@ -32,7 +32,7 @@ from caosadvancedtools.cfood import (AbstractCFood, AbstractFileCFood, CMeal,
get_entity_for_path) get_entity_for_path)
from caosadvancedtools.crawler import FileCrawler from caosadvancedtools.crawler import FileCrawler
from caosadvancedtools.example_cfood import ExampleCFood 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 lxml import etree
from datetime import datetime, timezone from datetime import datetime, timezone
......
...@@ -2,6 +2,7 @@ import unittest ...@@ -2,6 +2,7 @@ import unittest
from tempfile import NamedTemporaryFile from tempfile import NamedTemporaryFile
import caosdb as db import caosdb as db
import linkahead
import caosdb.apiutils import caosdb.apiutils
import h5py import h5py
import numpy as np import numpy as np
...@@ -77,8 +78,8 @@ class H5CFoodTest(unittest.TestCase): ...@@ -77,8 +78,8 @@ class H5CFoodTest(unittest.TestCase):
# TODO this does probably break the code: The function will not be # TODO this does probably break the code: The function will not be
# restored correctly. # restored correctly.
# Change it to use the BaseMockUpTest # Change it to use the BaseMockUpTest
real_retrieve = caosdb.apiutils.retrieve_entity_with_id real_retrieve = linkahead.apiutils.retrieve_entity_with_id
caosdb.apiutils.retrieve_entity_with_id = dummy_get linkahead.apiutils.retrieve_entity_with_id = dummy_get
# should run without problem # should run without problem
h5.collect_existing_structure(db.Record(), db.Record(id=234), h5.EntityMapping()) h5.collect_existing_structure(db.Record(), db.Record(id=234), h5.EntityMapping())
......
...@@ -4,6 +4,7 @@ from os import listdir, remove ...@@ -4,6 +4,7 @@ from os import listdir, remove
from os.path import abspath, dirname, exists, isfile, join from os.path import abspath, dirname, exists, isfile, join
import caosdb as db import caosdb as db
import linkahead as la
from caosadvancedtools.serverside.helper import (NameCollector, get_data, from caosadvancedtools.serverside.helper import (NameCollector, get_data,
get_file_via_download, get_file_via_download,
init_data_model, init_data_model,
...@@ -110,8 +111,8 @@ def test_get_file_via_download(): ...@@ -110,8 +111,8 @@ def test_get_file_via_download():
# TODO test whether something ends up in the logger # TODO test whether something ends up in the logger
class NotThere(DummyFile): class NotThere(DummyFile):
def download(*args, **kwargs): def download(*args, **kwargs):
raise db.CaosDBException() raise la.LinkAheadException()
with raises(db.CaosDBException): with raises(la.LinkAheadException):
get_file_via_download(Inconsistent()) 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