Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
CaosDB Python Integration Tests
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
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 Python Integration Tests
Commits
6a93e7ac
Verified
Commit
6a93e7ac
authored
4 years ago
by
Timm Fitschen
Browse files
Options
Downloads
Plain Diff
Merge branch 'f-etag' into f-fsm
parents
ef5df8ba
7dc613c4
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!3
F fsm
Pipeline
#6009
failed
4 years ago
Stage: setup
Stage: cert
Stage: style
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/test_query.py
+10
-0
10 additions, 0 deletions
tests/test_query.py
with
10 additions
and
0 deletions
tests/test_query.py
+
10
−
0
View file @
6a93e7ac
...
...
@@ -1054,6 +1054,8 @@ def test_query_cache():
response
=
query
.
execute
()
assert
response
==
1
assert
query
.
cached
==
False
assert
query
.
etag
is
not
None
etag
=
query
.
etag
# cached == True
query
=
h
.
Query
(
"
COUNT TestRT
"
)
...
...
@@ -1061,6 +1063,7 @@ def test_query_cache():
response
=
query
.
execute
()
assert
response
==
1
assert
query
.
cached
==
True
assert
query
.
etag
==
etag
# cached == True
query
=
h
.
Query
(
"
FIND TestRT
"
)
...
...
@@ -1068,6 +1071,7 @@ def test_query_cache():
response
=
query
.
execute
(
unique
=
True
)
assert
response
.
id
==
entity
.
id
assert
query
.
cached
==
True
assert
query
.
etag
==
etag
# cached == True
query
=
h
.
Query
(
"
SELECT bla FROM TestRT
"
)
...
...
@@ -1075,6 +1079,7 @@ def test_query_cache():
response
=
query
.
execute
(
unique
=
True
)
assert
response
.
id
==
entity
.
id
assert
query
.
cached
==
True
assert
query
.
etag
==
etag
# no cache flag
query
=
h
.
Query
(
"
SELECT bla FROM TestRT
"
)
...
...
@@ -1082,6 +1087,7 @@ def test_query_cache():
response
=
query
.
execute
(
unique
=
True
,
cache
=
False
)
assert
response
.
id
==
entity
.
id
assert
query
.
cached
==
False
assert
query
.
etag
==
etag
# cached == True
query
=
h
.
Query
(
"
SELECT bla FROM TestRT
"
)
...
...
@@ -1089,6 +1095,7 @@ def test_query_cache():
response
=
query
.
execute
(
unique
=
True
)
assert
response
.
id
==
entity
.
id
assert
query
.
cached
==
True
assert
query
.
etag
==
etag
# write resets cache
another_entity
=
h
.
Record
().
add_parent
(
"
TestRT
"
).
insert
()
...
...
@@ -1099,6 +1106,8 @@ def test_query_cache():
response
=
query
.
execute
()
assert
response
==
2
assert
query
.
cached
==
False
assert
query
.
etag
!=
etag
new_etag
=
query
.
etag
# cached == True
query
=
h
.
Query
(
"
COUNT TestRT
"
)
...
...
@@ -1106,6 +1115,7 @@ def test_query_cache():
response
=
query
.
execute
()
assert
response
==
2
assert
query
.
cached
==
True
assert
query
.
etag
==
new_etag
def
test_query_cache_with_permissions
():
...
...
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