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
8b0973ae
Unverified
Commit
8b0973ae
authored
4 years ago
by
Daniel
Browse files
Options
Downloads
Patches
Plain Diff
TEST: Removed xfail from test for caosdb-mysqlbackend
#18
parent
33e071f4
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
+4
-5
4 additions, 5 deletions
tests/test_issues_mysqlbackend.py
tests/test_update.py
+6
-3
6 additions, 3 deletions
tests/test_update.py
with
10 additions
and
8 deletions
tests/test_issues_mysqlbackend.py
+
4
−
5
View file @
8b0973ae
...
...
@@ -48,10 +48,9 @@ def teardown():
# ########################### Issue tests start here ###########################
@pytest.mark.xfail
@with_setup
(
setup
,
teardown
)
def
test_issue_18
():
"""
Sometimes, d
uplicate parents were returned.
"""
D
uplicate parents were returned
in some cases of self-hineritance
.
Tests for https://gitlab.com/caosdb/caosdb-mysqlbackend/-/issues/18
"""
...
...
@@ -64,9 +63,9 @@ def test_issue_18():
C
.
add_parent
(
C
)
# The self-parenting is here on purpose
C
.
add_parent
(
A
)
c
=
db
.
Container
()
c
.
extend
([
B
,
C
,
A
])
c
.
insert
()
c
ont
=
db
.
Container
()
c
ont
.
extend
([
B
,
C
,
A
])
c
ont
.
insert
()
C1
=
db
.
Entity
(
name
=
"
C
"
).
retrieve
()
pids
=
[
p
.
id
for
p
in
C1
.
parents
]
...
...
This diff is collapsed.
Click to expand it.
tests/test_update.py
+
6
−
3
View file @
8b0973ae
...
...
@@ -49,7 +49,8 @@ def test_property_no_id():
rt1
=
db
.
RecordType
(
name
=
"
RT1
"
).
insert
()
rt1
.
add_property
(
name
=
"
P1
"
).
update
(
raise_exception_on_error
=
False
)
assert
rt1
.
get_property
(
"
P1
"
).
get_errors
()[
0
].
description
==
"
Entity has no ID.
"
assert
rt1
.
get_property
(
"
P1
"
).
get_errors
()[
0
].
description
\
==
"
Entity has no ID.
"
def
test_parent_no_id
():
...
...
@@ -57,7 +58,8 @@ def test_parent_no_id():
parent
=
db
.
RecordType
(
name
=
"
RTP
"
).
insert
()
child
.
add_parent
(
name
=
"
RTP
"
).
update
(
raise_exception_on_error
=
False
)
assert
child
.
get_parent
(
"
RTP
"
).
get_errors
()[
0
].
description
==
"
Entity has no ID.
"
assert
child
.
get_parent
(
"
RTP
"
).
get_errors
()[
0
].
description
\
==
"
Entity has no ID.
"
def
test_update_1
():
...
...
@@ -104,7 +106,8 @@ def test_server_error_during_update():
p
=
db
.
Property
(
name
=
"
TestProperty
"
,
datatype
=
"
TestRT1
"
).
insert
()
p2
=
db
.
Property
(
name
=
"
TestBogusProperty
"
,
datatype
=
db
.
TEXT
).
insert
()
rec1
=
db
.
Record
(
name
=
"
TestRT1Rec1
"
).
add_parent
(
"
TestRT1
"
).
insert
()
rec2
=
db
.
Record
(
name
=
"
TestRT2Rec2
"
).
add_parent
(
"
TestRT2
"
).
add_property
(
"
TestProperty
"
,
"
TestRT1Rec1
"
).
insert
()
rec2
=
db
.
Record
(
name
=
"
TestRT2Rec2
"
).
add_parent
(
"
TestRT2
"
).
add_property
(
"
TestProperty
"
,
"
TestRT1Rec1
"
).
insert
()
# do stupid things
rec2
.
get_property
(
"
TestProperty
"
).
add_property
(
"
TestBogusProperty
"
)
...
...
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