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

TST: add int test for logging

parent b91ab1c6
No related branches found
No related tags found
2 merge requests!105REL: v0.4.0,!102MAINT: add logging on inserts and updates
Pipeline #34101 passed
......@@ -25,6 +25,7 @@
an integration test module that runs a test against a (close to) real world example
"""
from caosdb.utils.register_tests import clear_database, set_test_key
import logging
import json
import os
......@@ -85,7 +86,8 @@ def create_identifiable_adapter():
return ident
def test_dataset(clear_database, usemodel):
def test_dataset(clear_database, usemodel, caplog):
caplog.set_level(logging.DEBUG, logger="caoscrawler")
ident = create_identifiable_adapter()
crawler = Crawler(identifiableAdapter=ident)
crawler_definition = crawler.load_definition(
......@@ -119,6 +121,11 @@ def test_dataset(clear_database, usemodel):
"start_datetime='2022-02-10T16:36:48+01:00'") == 1
assert db.execute_query(f"FIND Event WITH latitude=53", unique=True)
# test logging
assert "Executed inserts" in caplog.text
assert "Going to insert" in caplog.text
assert "Executed updates" in caplog.text
def test_event_update(clear_database, usemodel):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment