diff --git a/unittests/data/Publications/Posters/2019-02-03_something/.caosdbignore b/unittests/data/Publications/Posters/2019-02-03_something/.linkaheadignore similarity index 100% rename from unittests/data/Publications/Posters/2019-02-03_something/.caosdbignore rename to unittests/data/Publications/Posters/2019-02-03_something/.linkaheadignore diff --git a/unittests/caosdbignore-example b/unittests/linkaheadignore-example similarity index 100% rename from unittests/caosdbignore-example rename to unittests/linkaheadignore-example diff --git a/unittests/test_json_schema_model_parser.py b/unittests/test_json_schema_model_parser.py index b93f61c0b6786e7c25b831e420830256fccdd554..ea52701deb0ae04c0be93693d160a9eec36b98ee 100644 --- a/unittests/test_json_schema_model_parser.py +++ b/unittests/test_json_schema_model_parser.py @@ -184,7 +184,7 @@ def test_enum(): 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(): """Check an enum property with type: integer""" # @author Florian Spreckelsen @@ -354,5 +354,5 @@ def test_name_property(): broken = parse_model_from_json_schema(os.path.join( FILEPATH, "datamodel_name_wrong_type.schema.json")) assert str(err.value).startswith( - "The 'name' property must be string-typed, otherwise it cannot be identified with CaosDB's " - "name property.") + "The 'name' property must be string-typed, otherwise it cannot be identified with " + "LinkAhead's name property.") diff --git a/unittests/test_caosdbignore.py b/unittests/test_linkaheadignore.py similarity index 85% rename from unittests/test_caosdbignore.py rename to unittests/test_linkaheadignore.py index d017b308279e940851b4d0ec28f38804d1de7c53..e4d9e3f7357e83cdfd834a443d413f80deffaacd 100644 --- a/unittests/test_caosdbignore.py +++ b/unittests/test_linkaheadignore.py @@ -29,17 +29,20 @@ import re from tempfile import NamedTemporaryFile 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__)) -class Caosdbignore(unittest.TestCase): +class LinkAheadIgnore(unittest.TestCase): def setUp(self): pass 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")) assert len(files) == 3 assert os.path.join(BASEDIR, "data", "datatypes.xlsx") in files diff --git a/unittests/test_sss_helper.py b/unittests/test_sss_helper.py index 5c0143fc088faa1954c51cff2238334db878d22e..4cd8e382cd582d974c24012d61b56320abe7ddf4 100644 --- a/unittests/test_sss_helper.py +++ b/unittests/test_sss_helper.py @@ -8,7 +8,7 @@ from linkaheadadvancedtools.serverside.helper import (NameCollector, get_data, get_file_via_download, init_data_model, 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 pytest import mark, raises @@ -110,8 +110,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 db.LinkAheadException() + with raises(db.LinkAheadException): get_file_via_download(Inconsistent()) diff --git a/unittests/test_utils.py b/unittests/test_utils.py index f958a957edf220db4a5f7774fbd818ab5fdc7bce..800104137fd27b0feb4e9a0670c0ac217dc2bc04 100644 --- a/unittests/test_utils.py +++ b/unittests/test_utils.py @@ -27,7 +27,7 @@ from tempfile import NamedTemporaryFile import linkahead as db from linkaheadadvancedtools.utils import (check_win_path, get_referenced_files, 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.exceptions import TransactionError diff --git a/unittests/test_yaml_model_parser.py b/unittests/test_yaml_model_parser.py index b5dc6a3b5811899562e6a5dc0ceb1b431d452083..b75114bf671785f204954b07ab65bbd74c381622 100644 --- a/unittests/test_yaml_model_parser.py +++ b/unittests/test_yaml_model_parser.py @@ -220,7 +220,7 @@ RT2: self.assertTrue(isinstance(model['c'], db.Property)) 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 = """ A: obligatory_properties: @@ -405,7 +405,7 @@ b: def test_issue_72(): """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 specified value. @@ -465,7 +465,7 @@ TestExperiment: def test_file_role(): """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 = """ @@ -479,7 +479,7 @@ F: def test_issue_36(): """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 = """