Assert that expected_message is found in the message of a raised exception. Args: expected_exception: Exception class expected to be raised. expected_message: expected error message string value. args: Function to be called and extra posi
(
self, expected_exception, expected_message, *args, **kwargs
)
| 864 | callable_obj(*args, **kwargs) |
| 865 | |
| 866 | def assertRaisesMessage( |
| 867 | self, expected_exception, expected_message, *args, **kwargs |
| 868 | ): |
| 869 | """ |
| 870 | Assert that expected_message is found in the message of a raised |
| 871 | exception. |
| 872 | |
| 873 | Args: |
| 874 | expected_exception: Exception class expected to be raised. |
| 875 | expected_message: expected error message string value. |
| 876 | args: Function to be called and extra positional args. |
| 877 | kwargs: Extra kwargs. |
| 878 | """ |
| 879 | return self._assertFooMessage( |
| 880 | self.assertRaises, |
| 881 | "exception", |
| 882 | expected_exception, |
| 883 | expected_message, |
| 884 | *args, |
| 885 | **kwargs, |
| 886 | ) |
| 887 | |
| 888 | def assertWarnsMessage(self, expected_warning, expected_message, *args, **kwargs): |
| 889 | """ |
no test coverage detected