Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
hub
ViralHostRangeDB
Commits
5f44b381
Commit
5f44b381
authored
Feb 08, 2022
by
Bryan BRANCOTTE
Browse files
check errors are found with import_later
parent
3a8dbe5d
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/viralhostrange/viralhostrangedb/tests/test_business_process.py
View file @
5f44b381
...
...
@@ -244,6 +244,14 @@ class DataFileReaderTestCase(TestCase):
self
.
assertRaises
(
ValueError
,
business_process
.
import_file
,
data_source
=
data_source
,
file
=
filename
)
business_process
.
import_file
(
data_source
=
data_source
,
file
=
filename
,
importation_observer
=
ImportationObserver
())
def
test_import_in_db_later
(
self
):
filename
=
os
.
path
.
join
(
self
.
test_data
,
"duplicated_empty_invalid.xlsx"
)
errors
,
_
=
business_process
.
import_file_later
(
file
=
filename
)
self
.
assertEqual
(
[
s
[:
s
.
index
(
"]"
)
+
1
]
for
s
in
errors
],
[
'[ImportErr1]'
,
'[ImportErr1]'
,
'[ImportErr3]'
,
'[ImportErr3]'
,
'[ImportErr2]'
,
],
)
class
DataFileReaderWithIdentifierTestCase
(
TestCase
):
test_data
=
"./test_data"
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment