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
747df17c
Unverified
Commit
747df17c
authored
4 years ago
by
Daniel
Browse files
Options
Downloads
Patches
Plain Diff
MAINT: Renamed test because issue moved
For issue
caosdb-server#110
(was
caosdb-mysqlbackend#24
).
parent
e25b7b7f
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
tests/test_issues_mysqlbackend.py
+0
-30
0 additions, 30 deletions
tests/test_issues_mysqlbackend.py
tests/test_issues_server.py
+30
-0
30 additions, 0 deletions
tests/test_issues_server.py
with
30 additions
and
30 deletions
tests/test_issues_mysqlbackend.py
+
0
−
30
View file @
747df17c
...
...
@@ -87,33 +87,3 @@ def test_issue_21():
cont
.
insert
()
rec
.
delete
()
def
test_issue_24
():
"""
query ignores ID: FIND MusicalInstrument which is referenced by Analysis with ID=124
"""
cont
=
db
.
Container
()
A
=
db
.
RecordType
(
name
=
"
TypeA
"
)
B
=
db
.
RecordType
(
name
=
"
TypeB
"
)
prop
=
db
.
Property
(
name
=
"
prop_ba
"
,
datatype
=
db
.
REFERENCE
)
# Referenced Records
a1
=
db
.
Record
().
add_parent
(
A
)
a2
=
db
.
Record
().
add_parent
(
A
)
# Referencing Records
b1
=
db
.
Record
().
add_parent
(
B
).
add_property
(
prop
,
value
=
a1
)
b2
=
db
.
Record
().
add_parent
(
B
).
add_property
(
prop
,
value
=
a2
)
cont
.
extend
([
A
,
B
,
prop
,
a1
,
a2
,
b1
,
b2
])
cont
.
insert
()
id_b1
=
b1
.
id
query
=
"
FIND TypeA WHICH IS REFERENCED BY TypeB WITH ID={}
"
.
format
(
id_b1
)
print
(
query
)
result
=
db
.
execute_query
(
query
)
print
(
result
)
assert
len
(
result
)
==
1
print
(
result
[
0
])
print
(
a1
)
assert
result
[
0
].
id
==
a1
.
id
This diff is collapsed.
Click to expand it.
tests/test_issues_server.py
+
30
−
0
View file @
747df17c
...
...
@@ -169,3 +169,33 @@ def test_issue_99():
time
.
sleep
(
0.1
)
dbfile
.
retrieve
()
assert
dbfile
.
checksum
is
not
None
def
test_issue_110
():
"""
query ignores ID: FIND MusicalInstrument which is referenced by Analysis with ID=124
"""
cont
=
db
.
Container
()
A
=
db
.
RecordType
(
name
=
"
TypeA
"
)
B
=
db
.
RecordType
(
name
=
"
TypeB
"
)
prop
=
db
.
Property
(
name
=
"
prop_ba
"
,
datatype
=
db
.
REFERENCE
)
# Referenced Records
a1
=
db
.
Record
().
add_parent
(
A
)
a2
=
db
.
Record
().
add_parent
(
A
)
# Referencing Records
b1
=
db
.
Record
().
add_parent
(
B
).
add_property
(
prop
,
value
=
a1
)
b2
=
db
.
Record
().
add_parent
(
B
).
add_property
(
prop
,
value
=
a2
)
cont
.
extend
([
A
,
B
,
prop
,
a1
,
a2
,
b1
,
b2
])
cont
.
insert
()
id_b1
=
b1
.
id
query
=
"
FIND TypeA WHICH IS REFERENCED BY TypeB WITH ID={}
"
.
format
(
id_b1
)
print
(
query
)
result
=
db
.
execute_query
(
query
)
print
(
result
)
assert
len
(
result
)
==
1
print
(
result
[
0
])
print
(
a1
)
assert
result
[
0
].
id
==
a1
.
id
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