Skip to content
Snippets Groups Projects
Commit d7ad49aa authored by florian's avatar florian
Browse files

TST: Adapt tests to new enums and re-activate some tests

parent be6ad88e
No related branches found
No related tags found
1 merge request!8F value data structs
Pipeline #13909 passed
...@@ -155,10 +155,8 @@ end ...@@ -155,10 +155,8 @@ end
ent_with_name = execute_query("FIND TestEnt") ent_with_name = execute_query("FIND TestEnt")
prop = CaosDB.Entity.create_property_entity( prop = CaosDB.Entity.create_property_entity(
name = "TestProperty", name = "TestProperty",
datatype = "TEXT", datatype = TEXT,
unit = "cm", unit = "cm",
is_reference = false,
is_list = false,
) )
insert_prop_transaction = create_transaction() insert_prop_transaction = create_transaction()
...@@ -166,7 +164,6 @@ end ...@@ -166,7 +164,6 @@ end
execute(insert_prop_transaction) execute(insert_prop_transaction)
results = get_results(insert_prop_transaction) results = get_results(insert_prop_transaction)
retrieve_prop_transaction = create_transaction() retrieve_prop_transaction = create_transaction()
add_retrieve_by_id(retrieve_prop_transaction, get_id(results[1])) add_retrieve_by_id(retrieve_prop_transaction, get_id(results[1]))
execute(retrieve_prop_transaction) execute(retrieve_prop_transaction)
...@@ -175,8 +172,8 @@ end ...@@ -175,8 +172,8 @@ end
@test length(results) == 1 @test length(results) == 1
@test has_errors(results[1]) == false @test has_errors(results[1]) == false
@test get_name(results[1]) == "TestProperty" @test get_name(results[1]) == "TestProperty"
#@test get_unit(results[1]) == "cm" @test get_unit(results[1]) == "cm"
@test get_datatype(results[1])[1] == "TEXT" @test get_datatype(results[1]) == (TEXT, nothing)
prop2 = CaosDB.Entity.create_property(id = get_id(results[1])) prop2 = CaosDB.Entity.create_property(id = get_id(results[1]))
CaosDB.Entity.append_property(ent_with_name[1], prop2) CaosDB.Entity.append_property(ent_with_name[1], prop2)
...@@ -197,8 +194,8 @@ end ...@@ -197,8 +194,8 @@ end
@test has_errors(results[1]) == false @test has_errors(results[1]) == false
@test length(CaosDB.Entity.get_properties(results[1])) == 1 @test length(CaosDB.Entity.get_properties(results[1])) == 1
prop = CaosDB.Entity.get_property(results[1], 1) prop = CaosDB.Entity.get_property(results[1], 1)
#@test get_name(prop) == "TestProperty" #TODO Why the name is unit? @test get_name(prop) == "TestProperty"
#@test get_unit(prop) == "cm" @test get_unit(prop) == "cm"
# 3. delete # 3. delete
ent_with_name = execute_query("FIND TestEnt") ent_with_name = execute_query("FIND TestEnt")
...@@ -255,7 +252,7 @@ end ...@@ -255,7 +252,7 @@ end
# 2. Upload Entity # 2. Upload Entity
ent_with_name = CaosDB.Entity.create_entity("TestFile") ent_with_name = CaosDB.Entity.create_entity("TestFile")
set_role(ent_with_name, "FILE") set_role(ent_with_name, FILE)
set_local_path(ent_with_name, upload_path) set_local_path(ent_with_name, upload_path)
set_remote_path(ent_with_name, string("/Inttests/", fname)) set_remote_path(ent_with_name, string("/Inttests/", fname))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment