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
f2e77cc3
Verified
Commit
f2e77cc3
authored
1 year ago
by
Daniel Hornung
Browse files
Options
Downloads
Patches
Plain Diff
TEST: Test for linkahead-pylib#108
parent
29cdcc51
No related branches found
No related tags found
No related merge requests found
Pipeline
#42727
failed
1 year 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
tests/test_issues_pylib.py
+81
-0
81 additions, 0 deletions
tests/test_issues_pylib.py
with
81 additions
and
0 deletions
tests/test_issues_pylib.py
0 → 100644
+
81
−
0
View file @
f2e77cc3
# -*- coding: utf-8 -*-
# This file is a part of the LinkAhead Project.
#
# Copyright (c) 2023 IndiScale GmbH <info@indiscale.com>
# Copyright (c) 2023 Daniel Hornung <d.hornung@indiscale.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
"""
Tests for issues on gitlab.com, project linkahead-pylib.
Tests should be named:
``test_gitlab_com_{issue_id}``
"""
import
math
import
os
import
tempfile
import
time
import
linkahead
as
db
import
pytest
from
linkahead
import
administration
as
admin
from
linkahead.exceptions
import
(
TransactionError
,
HTTPClientError
)
CURATOR_ROLE
=
"
curator
"
def
setup_module
():
db
.
configure_connection
()
try
:
db
.
execute_query
(
"
FIND ENTITY WITH ID > 99
"
).
delete
()
except
Exception
as
delete_exc
:
print
(
delete_exc
)
try
:
admin
.
_delete_user
(
"
TestUser
"
)
except
Exception
as
delete_exc
:
print
(
delete_exc
)
try
:
admin
.
_delete_role
(
CURATOR_ROLE
)
except
Exception
as
delete_exc
:
print
(
delete_exc
)
def
setup_function
(
function
):
"""
No setup required.
"""
setup_module
()
def
teardown_function
(
function
):
"""
Deleting entities again.
"""
setup_module
()
# ########################### Issue tests start here #####################
@pytest.mark.xfail
(
reason
=
"
Entities with many, long, properties:
"
"
https://gitlab.com/linkahead/linkahead-pylib/-/issues/108
"
)
def
test_gitlab_com_108
(
self
):
# create RT and one property
cont
=
db
.
Container
()
long
=
"
Long
"
*
50
first_RT
=
db
.
RecordType
(
name
=
f
"
TestRecord_first
"
)
for
index
in
range
(
20
):
this_RT
=
db
.
RecordType
(
name
=
f
"
TestRecord_
{
long
}
_
{
index
:
02
d
}
"
)
first_RT
.
add_property
(
this_RT
)
cont
.
append
(
first_RT
)
cont
.
retrieve
()
This diff is collapsed.
Click to expand it.
Daniel Hornung
@daniel
mentioned in issue
caosdb-pylib#178 (closed)
·
1 year ago
mentioned in issue
caosdb-pylib#178 (closed)
mentioned in issue caosdb-pylib#178
Toggle commit list
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