Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
cubicweb
cubes
skos
Commits
2b88d62b95d1
Commit
1163c44d
authored
Nov 28, 2017
by
Denis Laxalde
Browse files
Explicitly pass "fpath" to run_import_skos in ccplugin tests
We'll need to use another file in the next changeset.
parent
5eda4ae7deb7
Changes
1
Hide whitespace changes
Inline
Side-by-side
test/test_ccplugin.py
View file @
2b88d62b
...
...
@@ -50,8 +50,8 @@ class ImportSkosDataCommandTC(testlib.CubicWebTC):
CubicWebConfiguration
.
config_for
=
self
.
orig_config_for
super
(
ImportSkosDataCommandTC
,
self
).
tearDown
()
def
run_import_skos
(
self
,
*
args
):
cmd
=
[
self
.
appid
,
self
.
datapath
(
'skos.rdf'
)
]
+
list
(
args
)
def
run_import_skos
(
self
,
fpath
,
*
args
):
cmd
=
[
self
.
appid
,
fpath
]
+
list
(
args
)
sys
.
stdout
=
StringIO
()
try
:
ccplugin
.
ImportSkosData
(
None
).
main_run
(
cmd
)
...
...
@@ -70,15 +70,17 @@ class ImportSkosDataCommandTC(testlib.CubicWebTC):
self
.
assertEqual
(
concept
.
labels
,
expected
)
def
test_nooption
(
self
):
self
.
run_import_skos
()
self
.
run_import_skos
(
self
.
datapath
(
'skos.rdf'
)
)
self
.
_test_base
()
def
test_nohook
(
self
):
self
.
run_import_skos
(
'--cw-store'
,
'nohook'
)
self
.
run_import_skos
(
self
.
datapath
(
'skos.rdf'
),
'--cw-store'
,
'nohook'
)
self
.
_test_base
()
def
test_massive
(
self
):
self
.
run_import_skos
(
'-s'
,
'massive'
)
self
.
run_import_skos
(
self
.
datapath
(
'skos.rdf'
),
'-s'
,
'massive'
)
self
.
_test_base
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment