|
1 | 1 | from importlib import import_module |
2 | 2 | from inspect import signature |
| 3 | +from unittest.mock import MagicMock, patch |
| 4 | + |
| 5 | +import pytest |
| 6 | +from click.testing import Result |
| 7 | + |
| 8 | +from dac._input.config import PackConfig |
3 | 9 | from test.cli_utilities import invoke_dac_pack |
4 | 10 | from test.data import ( |
5 | 11 | get_path_to_missing_requirement_load, |
|
9 | 15 | get_path_to_wrong_syntax_schema, |
10 | 16 | ) |
11 | 17 | from test.data.pack_input import input_with_local_data, input_with_self_contained_data |
12 | | -from unittest.mock import MagicMock, patch |
13 | | - |
14 | | -import pytest |
15 | | -from click.testing import Result |
16 | | -from dac._input.config import PackConfig |
17 | 18 |
|
18 | 19 |
|
19 | 20 | @pytest.fixture(autouse=True) |
@@ -45,11 +46,11 @@ def test_if_data_does_not_match_schema_error_contains_pandera_error_info(): |
45 | 46 | result = invoke_dac_pack(schema=get_path_to_sample_schema().as_posix()) |
46 | 47 | assert result.exit_code != 0 |
47 | 48 | error_message = str(result.exception) |
48 | | - assert "schema_context" in error_message |
49 | | - assert "check" in error_message |
50 | | - assert "failure_case" in error_message |
51 | 49 | assert "int1" in error_message |
| 50 | + assert "float1" in error_message |
| 51 | + assert "string1" in error_message |
52 | 52 | assert "date1" in error_message |
| 53 | + assert "datetime1" in error_message |
53 | 54 |
|
54 | 55 |
|
55 | 56 | def test_if_load_requires_missing_requirement_then_error_contains_meaningful_info(): |
|
0 commit comments