Пример #1
0
    def test_it_extends_ServiceError(self):
        exc = exceptions.ValidationError('some message')

        assert isinstance(exc, exceptions.ValidationError)
        assert isinstance(exc, exceptions.ServiceError)
Пример #2
0
    def test_it_can_set_message(self):
        exc = exceptions.ValidationError('a message')

        assert 'a message' in repr(exc)
Пример #3
0
    def test_it_can_set_message(self):
        exc = exceptions.ValidationError("a message")

        assert "a message" in repr(exc)