Skip to content
Snippets Groups Projects
Verified Commit 3b03a819 authored by Daniel Hornung's avatar Daniel Hornung
Browse files

WIP: Rename caosdb -> linkahead

parent cf56b899
Branches
No related tags found
1 merge request!79MAINT: linkahead rename
Pipeline #36701 failed
File moved
...@@ -184,7 +184,7 @@ def test_enum(): ...@@ -184,7 +184,7 @@ def test_enum():
assert model[name].has_parent(model["number_enum"], retrieve=False) assert model[name].has_parent(model["number_enum"], retrieve=False)
@pytest.mark.xfail(reason="Don't allow integer enums until https://gitlab.indiscale.com/caosdb/src/caosdb-server/-/issues/224 has been fixed") @pytest.mark.xfail(reason="Don't allow integer enums until https://gitlab.indiscale.com/caosdb/src/linkahead-server/-/issues/224 has been fixed")
def test_int_enum(): def test_int_enum():
"""Check an enum property with type: integer""" """Check an enum property with type: integer"""
# @author Florian Spreckelsen # @author Florian Spreckelsen
...@@ -354,5 +354,5 @@ def test_name_property(): ...@@ -354,5 +354,5 @@ def test_name_property():
broken = parse_model_from_json_schema(os.path.join( broken = parse_model_from_json_schema(os.path.join(
FILEPATH, "datamodel_name_wrong_type.schema.json")) FILEPATH, "datamodel_name_wrong_type.schema.json"))
assert str(err.value).startswith( assert str(err.value).startswith(
"The 'name' property must be string-typed, otherwise it cannot be identified with CaosDB's " "The 'name' property must be string-typed, otherwise it cannot be identified with "
"name property.") "LinkAhead's name property.")
...@@ -29,17 +29,20 @@ import re ...@@ -29,17 +29,20 @@ import re
from tempfile import NamedTemporaryFile from tempfile import NamedTemporaryFile
import unittest import unittest
from linkaheadadvancedtools.loadFiles import compile_file_list, create_re_for_file_list, combine_ignore_files from linkaheadadvancedtools.loadFiles import (compile_file_list,
create_re_for_file_list,
combine_ignore_files,
)
BASEDIR = os.path.dirname(os.path.realpath(__file__)) BASEDIR = os.path.dirname(os.path.realpath(__file__))
class Caosdbignore(unittest.TestCase): class LinkAheadIgnore(unittest.TestCase):
def setUp(self): def setUp(self):
pass pass
def test_compile(self): def test_compile(self):
files = compile_file_list(os.path.join(BASEDIR, "caosdbignore-example"), files = compile_file_list(os.path.join(BASEDIR, "linkaheadignore-example"),
os.path.join(BASEDIR, "data")) os.path.join(BASEDIR, "data"))
assert len(files) == 3 assert len(files) == 3
assert os.path.join(BASEDIR, "data", "datatypes.xlsx") in files assert os.path.join(BASEDIR, "data", "datatypes.xlsx") in files
......
...@@ -8,7 +8,7 @@ from linkaheadadvancedtools.serverside.helper import (NameCollector, get_data, ...@@ -8,7 +8,7 @@ from linkaheadadvancedtools.serverside.helper import (NameCollector, get_data,
get_file_via_download, get_file_via_download,
init_data_model, init_data_model,
parse_arguments, send_mail) parse_arguments, send_mail)
from caosdb import RecordType, configure_connection, get_config from linkahead import RecordType, configure_connection, get_config
from linkahead.connection.mockup import MockUpResponse, MockUpServerConnection from linkahead.connection.mockup import MockUpResponse, MockUpServerConnection
from pytest import mark, raises from pytest import mark, raises
...@@ -110,8 +110,8 @@ def test_get_file_via_download(): ...@@ -110,8 +110,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 db.LinkAheadException()
with raises(db.CaosDBException): with raises(db.LinkAheadException):
get_file_via_download(Inconsistent()) get_file_via_download(Inconsistent())
......
...@@ -27,7 +27,7 @@ from tempfile import NamedTemporaryFile ...@@ -27,7 +27,7 @@ from tempfile import NamedTemporaryFile
import linkahead as db import linkahead as db
from linkaheadadvancedtools.utils import (check_win_path, get_referenced_files, from linkaheadadvancedtools.utils import (check_win_path, get_referenced_files,
string_to_person, create_entity_link) string_to_person, create_entity_link)
from caosdb import RecordType, configure_connection, get_config from linkahead import RecordType, configure_connection, get_config
from linkahead.connection.mockup import MockUpResponse, MockUpServerConnection from linkahead.connection.mockup import MockUpResponse, MockUpServerConnection
from linkahead.exceptions import TransactionError from linkahead.exceptions import TransactionError
......
...@@ -220,7 +220,7 @@ RT2: ...@@ -220,7 +220,7 @@ RT2:
self.assertTrue(isinstance(model['c'], db.Property)) self.assertTrue(isinstance(model['c'], db.Property))
self.assertEqual(model['c'].datatype, db.LIST(db.TEXT)) self.assertEqual(model['c'].datatype, db.LIST(db.TEXT))
# This failed for an older version of caosdb-models # This failed for an older version of linkahead-models
string_list = """ string_list = """
A: A:
obligatory_properties: obligatory_properties:
...@@ -405,7 +405,7 @@ b: ...@@ -405,7 +405,7 @@ b:
def test_issue_72(): def test_issue_72():
"""Tests for """Tests for
https://gitlab.indiscale.com/caosdb/src/caosdb-advanced-user-tools/-/issues/72 https://gitlab.indiscale.com/caosdb/src/linkahead-advanced-user-tools/-/issues/72
In some cases, faulty values would be read in for properties without a In some cases, faulty values would be read in for properties without a
specified value. specified value.
...@@ -465,7 +465,7 @@ TestExperiment: ...@@ -465,7 +465,7 @@ TestExperiment:
def test_file_role(): def test_file_role():
"""Not implemented for now, see """Not implemented for now, see
https://gitlab.indiscale.com/caosdb/src/caosdb-advanced-user-tools/-/issues/74. https://gitlab.indiscale.com/caosdb/src/linkahead-advanced-user-tools/-/issues/74.
""" """
model = """ model = """
...@@ -479,7 +479,7 @@ F: ...@@ -479,7 +479,7 @@ F:
def test_issue_36(): def test_issue_36():
"""Test whether the `parent` keyword is deprecated. """Test whether the `parent` keyword is deprecated.
See https://gitlab.com/caosdb/caosdb-advanced-user-tools/-/issues/36. See https://gitlab.com/linkahead/linkahead-advanced-user-tools/-/issues/36.
""" """
model_string = """ model_string = """
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment