Create a TestCreator object. :Parameters: - `create_test`: callback that returns a test case. The callback must accept the following arguments - a dictionary containing the entire test specification (the `scenario_def`), a dictionary containing
(self, create_test, test_class, test_path)
| 63 | """Class to create test cases from specifications.""" |
| 64 | |
| 65 | def __init__(self, create_test, test_class, test_path): |
| 66 | """Create a TestCreator object. |
| 67 | |
| 68 | :Parameters: |
| 69 | - `create_test`: callback that returns a test case. The callback |
| 70 | must accept the following arguments - a dictionary containing the |
| 71 | entire test specification (the `scenario_def`), a dictionary |
| 72 | containing the specification for which the test case will be |
| 73 | generated (the `test_def`). |
| 74 | - `test_class`: the unittest.TestCase class in which to create the |
| 75 | test case. |
| 76 | - `test_path`: path to the directory containing the JSON files with |
| 77 | the test specifications. |
| 78 | """ |
| 79 | self._create_test = create_test |
| 80 | self._test_class = test_class |
| 81 | self.test_path = test_path |
| 82 | |
| 83 | def _ensure_min_max_server_version(self, scenario_def, method): |
| 84 | """Test modifier that enforces a version range for the server on a |