Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
CaosDB Crawler
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
caosdb
Software
CaosDB Crawler
Commits
317cfcac
Commit
317cfcac
authored
2 years ago
by
Henrik tom Wörden
Browse files
Options
Downloads
Patches
Plain Diff
TST: add int test for logging
parent
b91ab1c6
No related branches found
No related tags found
2 merge requests
!105
REL: v0.4.0
,
!102
MAINT: add logging on inserts and updates
Pipeline
#34101
passed
2 years ago
Stage: info
Stage: setup
Stage: cert
Stage: style
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
integrationtests/test_realworld_example.py
+8
-1
8 additions, 1 deletion
integrationtests/test_realworld_example.py
with
8 additions
and
1 deletion
integrationtests/test_realworld_example.py
+
8
−
1
View file @
317cfcac
...
...
@@ -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
):
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment