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
636cd5c5
Verified
Commit
636cd5c5
authored
2 years ago
by
Daniel Hornung
Browse files
Options
Downloads
Patches
Plain Diff
MAINT: Assert that auto-inserted files do not have names.
parent
c2e87a34
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!57
ENH: Test for issue caosdb-server#192 (automatic name for mass-imported File entities)
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
CHANGELOG.md
+1
-0
1 addition, 0 deletions
CHANGELOG.md
README.md
+1
-1
1 addition, 1 deletion
README.md
tests/test_file.py
+7
-7
7 additions, 7 deletions
tests/test_file.py
with
9 additions
and
8 deletions
CHANGELOG.md
+
1
−
0
View file @
636cd5c5
...
...
@@ -54,6 +54,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
xfail until
[
caosdb-pylib#34
](
https://gitlab.com/caosdb/caosdb-pylib/-/issues/34
)
is fixed.
*
Test for
[
caosdb-server#197
](
https://gitlab.com/caosdb/caosdb-server/-/issues/197
)
.
### Deprecated (for soon-to-be removed features)
...
...
This diff is collapsed.
Click to expand it.
README.md
+
1
−
1
View file @
636cd5c5
...
...
@@ -65,7 +65,7 @@ when creating the merge request. This allows our team to work with you on your r
*
Copyright (C) 2018 Research Group Biomedical Physics, Max Planck Institute
for Dynamics and Self-Organization Göttingen.
*
Copyright (C) 2020-202
1
Indiscale GmbH
<info@indiscale.com>
*
Copyright (C) 2020-202
3
Indiscale GmbH
<info@indiscale.com>
All files in this repository are licensed under the
[
GNU Affero General Public
License
](
LICENCE.md
)
(
version
3 or later).
This diff is collapsed.
Click to expand it.
tests/test_file.py
+
7
−
7
View file @
636cd5c5
...
...
@@ -5,8 +5,8 @@
#
# Copyright (C) 2018 Research Group Biomedical Physics,
# Max-Planck-Institute for Dynamics and Self-Organization Göttingen
# Copyright (C) 2019 IndiScale GmbH (info@indiscale.com)
# Copyright (C) 2019 Daniel Hornung (d.hornung@indiscale.com)
# Copyright (C) 2019
-2023
IndiScale GmbH (info@indiscale.com)
# Copyright (C) 2019
-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
...
...
@@ -536,7 +536,7 @@ def test_insert_files_in_dir_with_symlink():
assert_is_not_none
(
c
.
messages
[
"
Info
"
,
0
])
assert_equal
(
c
.
messages
[
"
Info
"
,
0
][
0
],
"
Files count in linked_subfolder/: 1
"
)
assert
_equal
(
c
[
0
].
name
,
"
test2.dat
"
)
assert
c
[
0
].
name
is
None
assert_equal
(
c
[
0
].
path
,
"
/linked_subfolder/test2.dat
"
)
d
=
models
.
Container
()
...
...
@@ -551,7 +551,7 @@ def test_insert_files_in_dir_with_symlink():
assert_equal
(
d
.
messages
[
"
Info
"
,
0
][
0
],
"
Files count in linked_subfolder/: 1
"
)
assert_true
(
d
[
0
].
is_valid
())
assert
_equal
(
d
[
0
].
name
,
"
test2.dat
"
)
assert
d
[
0
].
name
is
None
assert_equal
(
d
[
0
].
path
,
"
/linked_subfolder/test2.dat
"
)
finally
:
...
...
@@ -633,7 +633,7 @@ def test_insert_files_in_dir():
# only the new file is given back...
assert_equal
(
1
,
len
(
e
))
assert_false
(
e
[
0
].
is_valid
())
assert
_equal
(
e
[
0
].
name
,
"
test3.dat
"
)
assert
e
[
0
].
name
is
None
assert_equal
(
e
[
0
].
path
,
"
/testfolder/test3.dat
"
)
f
=
models
.
Container
()
...
...
@@ -648,7 +648,7 @@ def test_insert_files_in_dir():
# only the new file is given back...
assert_equal
(
1
,
len
(
f
))
assert_true
(
f
[
0
].
is_valid
())
assert
_equal
(
f
[
0
].
name
,
"
test3.dat
"
)
assert
f
[
0
].
name
is
None
assert_equal
(
f
[
0
].
path
,
"
/testfolder/test3.dat
"
)
finally
:
...
...
@@ -700,7 +700,7 @@ def test_insert_files_in_dir_regex():
# the other has been inserted
assert
len
(
c
)
==
1
assert
c
[
0
].
name
==
"
test_insert.dat
"
assert
c
[
0
].
name
is
None
finally
:
try
:
...
...
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