🔐 Sid Gifari File Manager Pro
v8.0.5 | 2026-06-15 05:03:29 | PHP 8.1.34
📂
/ (Root)
/
opt
/
cloudlinux
/
venv
/
lib
/
python3.11
/
site-packages
/
testfixtures
/
tests
/
test_django
📍 /opt/cloudlinux/venv/lib/python3.11/site-packages/testfixtures/tests/test_django
🔄 Refresh
✏️
Editing: test_shouldraise.py
Read Only
from django.core.exceptions import ValidationError from testfixtures import ShouldRaise from testfixtures.shouldraise import ShouldAssert class TestShouldRaiseWithValidatorErrors(object): def test_as_expected(self): with ShouldRaise(ValidationError("d'oh")): raise ValidationError("d'oh") def test_not_as_expected(self): message = ( 'ValidationError(["d\'oh"]) (expected) != ' 'ValidationError([\'nuts\']) (raised)' ) with ShouldAssert(message): with ShouldRaise(ValidationError("d'oh")): raise ValidationError("nuts")
💾 Save Changes
❌ Cancel