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

TST: update testdata, fix link, more informative output

parent 3aafe862
No related branches found
No related tags found
1 merge request!39Release 0.4.0
Pipeline #18430 passed
../src/caosadvancedtools/examples/example_script.py
\ No newline at end of file
../src/caosadvancedtools/serverside/examples/example_script.py
\ No newline at end of file
No preview for this file type
No preview for this file type
import plot
import plot
......@@ -12,10 +12,12 @@ if __name__ == "__main__":
directory = TemporaryDirectory()
export_related_to(rec.id, directory=directory.name)
# delete everything
print("Clearing database")
recs = db.execute_query("FIND entity with id>99")
recs.delete()
assert 0 == len(db.execute_query("FIND File which is stored at "
"**/poster.pdf"))
print("Importing stored elements")
import_xml(os.path.join(directory.name, "caosdb_data.xml"), interactive=False)
# The following tests the existence of some required entities.
......@@ -26,3 +28,4 @@ if __name__ == "__main__":
db.execute_query("FIND RecordType Person", unique=True)
db.execute_query("FIND Record Person with firstname=Only", unique=True)
db.execute_query("FIND File which is stored at **/poster.pdf", unique=True)
print("Found all required Records and Files.")
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment