Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
caosdb-advanced-user-tools
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-advanced-user-tools
Commits
54aab5dd
Commit
54aab5dd
authored
1 year ago
by
Henrik tom Wörden
Browse files
Options
Downloads
Patches
Plain Diff
test
parent
cfb52edc
No related branches found
Branches containing commit
No related tags found
Tags containing commit
2 merge requests
!89
ENH: JsonSchemaExporter accepts do_not_create parameter.
,
!80
F simple schema export
Pipeline
#42531
failed
1 year ago
Stage: setup
Stage: cert
Stage: style
Stage: unittest
Stage: integrationtest
Changes
2
Pipelines
5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
integrationtests/test_cache.py
+4
-1
4 additions, 1 deletion
integrationtests/test_cache.py
src/caosadvancedtools/cache.py
+4
-5
4 additions, 5 deletions
src/caosadvancedtools/cache.py
with
8 additions
and
6 deletions
integrationtests/test_cache.py
+
4
−
1
View file @
54aab5dd
...
...
@@ -64,8 +64,11 @@ class CacheTest(unittest.TestCase):
update
=
UpdateCache
(
db_file
=
self
.
cache
)
run_id
=
"
a
"
print
(
db
.
execute_query
(
"
FIND Record TestRecord
"
,
unique
=
True
))
print
(
db
.
execute_query
(
"
FIND Record
"
+
str
(
rec
.
id
),
unique
=
True
))
print
(
db
.
execute_query
(
"
FIND entity with id=
"
+
str
(
rec
.
id
),
unique
=
True
))
try
:
print
(
db
.
execute_query
(
"
FIND Record
"
+
str
(
rec
.
id
),
unique
=
True
))
except
:
print
(
"
Query does not work as expected
"
)
update
.
insert
(
cont
,
run_id
)
assert
len
(
update
.
get_updates
(
run_id
))
==
1
...
...
This diff is collapsed.
Click to expand it.
src/caosadvancedtools/cache.py
+
4
−
5
View file @
54aab5dd
...
...
@@ -27,16 +27,15 @@
# something to replace this.
import
os
import
sqlite3
from
copy
import
deepcopy
import
tempfile
import
warnings
from
abc
import
ABC
,
abstractmethod
from
copy
import
deepcopy
from
hashlib
import
sha256
import
warnings
import
caosdb
as
db
from
lxml
import
etree
import
tempfile
def
put_in_container
(
stuff
):
if
isinstance
(
stuff
,
list
):
...
...
@@ -344,7 +343,7 @@ class UpdateCache(AbstractCache):
old_ones
=
db
.
Container
()
for
ent
in
cont
:
old_ones
.
append
(
db
.
execute_query
(
"
FIND ENTITY {}
"
.
format
(
ent
.
id
),
old_ones
.
append
(
db
.
execute_query
(
"
FIND ENTITY
WITH ID=
{}
"
.
format
(
ent
.
id
),
unique
=
True
))
return
old_ones
...
...
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