-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Fix parser config format + not row list * Add fallback for non-list rows in from_json * Linting * Linting II --------- Co-authored-by: Michael Franklin <[email protected]>
- Loading branch information
1 parent
f67695d
commit 8b7b69e
Showing
3 changed files
with
71 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -200,13 +200,15 @@ def test_get_parser_instance_success( | |
"""Test get_parser_instance success""" | ||
|
||
mock_get_accessor_config.return_value = { | ||
'[email protected]': [ | ||
{ | ||
'name': 'test/v1', | ||
'default_parameters': {}, | ||
# 'parser_name': 'test', | ||
} | ||
] | ||
'[email protected]': { | ||
'parsers': [ | ||
{ | ||
'name': 'test/v1', | ||
'default_parameters': {}, | ||
# 'parser_name': 'test', | ||
} | ||
] | ||
} | ||
} | ||
|
||
mock_prepare_parser_map.return_value = { | ||
|
@@ -234,13 +236,15 @@ def test_get_parser_instance_different_parser_name( | |
"""Test get_parser_instance success""" | ||
|
||
mock_get_accessor_config.return_value = { | ||
'[email protected]': [ | ||
{ | ||
'name': 'test/v1', | ||
'default_parameters': {'project': 'test'}, | ||
'parser_name': 'different_parser/name', | ||
} | ||
] | ||
'[email protected]': { | ||
'parsers': [ | ||
{ | ||
'name': 'test/v1', | ||
'default_parameters': {'project': 'test'}, | ||
'parser_name': 'different_parser/name', | ||
} | ||
] | ||
} | ||
} | ||
|
||
mock_prepare_parser_map.return_value = { | ||
|
@@ -284,12 +288,14 @@ def test_get_parser_no_matching_config( | |
"""Test get_parser_instance success""" | ||
|
||
mock_get_accessor_config.return_value = { | ||
'[email protected]': [ | ||
{ | ||
'name': 'test/v1', | ||
'default_parameters': {'project': 'test'}, | ||
} | ||
] | ||
'[email protected]': { | ||
'parsers': [ | ||
{ | ||
'name': 'test/v1', | ||
'default_parameters': {'project': 'test'}, | ||
} | ||
] | ||
} | ||
} | ||
|
||
# this doesn't need to be mocked as it fails before here | ||
|
@@ -316,12 +322,14 @@ def test_get_parser_no_matching_parser( | |
"""Test get_parser_instance success""" | ||
|
||
mock_get_accessor_config.return_value = { | ||
'[email protected]': [ | ||
{ | ||
'name': 'a/b', | ||
'default_parameters': {'project': 'test'}, | ||
} | ||
] | ||
'[email protected]': { | ||
'parsers': [ | ||
{ | ||
'name': 'a/b', | ||
'default_parameters': {'project': 'test'}, | ||
} | ||
] | ||
} | ||
} | ||
|
||
mock_prepare_parser_map.return_value = { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters