Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
ckanext-odsh
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Open-Data
ckanext-odsh
Commits
2ba2b431
Commit
2ba2b431
authored
6 years ago
by
anonymous
Browse files
Options
Downloads
Patches
Plain Diff
ODPSH-(16,35): adds unittest for the ValueError, if config string is empty
parent
35f544e9
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
ckanext/odsh/tests/test_ckan_mapper.py
+21
-0
21 additions, 0 deletions
ckanext/odsh/tests/test_ckan_mapper.py
with
21 additions
and
0 deletions
ckanext/odsh/tests/test_ckan_mapper.py
+
21
−
0
View file @
2ba2b431
...
...
@@ -5,6 +5,9 @@ import unittest
from
ckanext.odsh.harvesters
import
ckan_mapper
as
mapper
def
value_error
():
raise
ValueError
(
'
Config string can not be empty.
'
)
class
TestMappingMethodsStatistikamtNord
(
unittest
.
TestCase
):
# Files to load
...
...
@@ -17,6 +20,24 @@ class TestMappingMethodsStatistikamtNord(unittest.TestCase):
config_filter
=
mapper
.
sta_amt_nord
.
config_filter
numbers
=
mapper
.
sta_amt_nord
.
numbers
# Test pyjq mapper with invalid StANKategorie
def
test_pyjq_mapper_with_invalid_config_string
(
self
):
# Save the data for generating new input for the test
test_dict
=
self
.
input_data
# Arrange
self
.
config_filter
=
""
# Act
# Assert
with
self
.
assertRaises
(
ValueError
):
mapper
.
pyjq_mapper
(
self
.
config_filter
,
test_dict
,
self
.
numbers
)
value_error
# Test pyjq mapper with invalid StANKategorie
def
test_pyjq_mapper_with_invalid_StANKategorie
(
self
):
...
...
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