Skip to content

Commit

Permalink
Update test_validate.py
Browse files Browse the repository at this point in the history
  • Loading branch information
SireInsectus committed Nov 24, 2023
1 parent 86f23b3 commit 8392d31
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions test/dbacademy_test/common/test_validate.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,12 +173,14 @@ def test_tuple_value(self):
self.assertEqual("""Error-Type | Expected the parameter 'value' to be of type <class 'tuple'>, found <class 'list'>.""", e.message)

try:
# noinspection PyTypeChecker
validate(value=("asdf", 1, 2.0, False)).tuple("str", int, float, bool)
self.fail(EXPECTED_ASSERTION_ERROR)
except ValidationError as e:
self.assertEqual("""Error-Internal | Expected Validator.__validate_data_type(..)'s parameter 'element_types[0]' to be a python "type", found <class 'str'>.""", e.message)

try:
# noinspection PyTypeChecker
validate(value=("asdf", 1, 2.0, False)).tuple(str, int, False, bool)
self.fail(EXPECTED_ASSERTION_ERROR)
except ValidationError as e:
Expand Down

0 comments on commit 8392d31

Please sign in to comment.