File tree Expand file tree Collapse file tree 3 files changed +26
-4
lines changed Expand file tree Collapse file tree 3 files changed +26
-4
lines changed Original file line number Diff line number Diff line change 1
1
# pylint: disable=cannot-enumerate-pytest-fixtures
2
2
import pytest
3
3
4
- from src .jbi import configuration as jbi_configuration
4
+ from src .jbi import configuration
5
5
6
6
7
7
def test_mock_jbi_files ():
8
- with pytest .raises (jbi_configuration .ProcessError ):
9
- jbi_configuration .get_yaml_configurations (
8
+ with pytest .raises (configuration .ProcessError ):
9
+ configuration .get_yaml_configurations (
10
10
jbi_config_file = "tests/unit/jbi/test-config.yaml"
11
11
)
12
12
13
13
14
14
def test_actual_jbi_files ():
15
- jbi_map = jbi_configuration .get_yaml_configurations ()
15
+ jbi_map = configuration .get_yaml_configurations ()
16
16
assert jbi_map
Original file line number Diff line number Diff line change
1
+ # pylint: disable=cannot-enumerate-pytest-fixtures
2
+ import pytest
3
+
4
+ from src .jbi .whiteboard_actions import default
5
+
6
+
7
+ def test_default_invalid_init ():
8
+ with pytest .raises (TypeError ):
9
+ default .init () # pylint: disable=no-value-for-parameter
10
+
11
+
12
+ def test_default_returns_callable_without_data ():
13
+ callable_object = default .init (whiteboard_tag = "" , jira_project_key = "" )
14
+ assert callable_object
15
+ with pytest .raises (TypeError ):
16
+ assert callable_object ()
17
+
18
+
19
+ def test_default_returns_callable_with_data ():
20
+ callable_object = default .init (whiteboard_tag = "" , jira_project_key = "" )
21
+ assert callable_object
22
+ assert callable_object (payload = {}, context = {})
You can’t perform that action at this time.
0 commit comments