Submit
Path:
~
/
/
opt
/
cloudlinux
/
venv
/
lib64
/
python3.11
/
site-packages
/
testfixtures
/
tests
/
test_django
/
File Content:
test_shouldraise.py
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")
Edit
Rename
Chmod
Delete
FILE
FOLDER
Name
Size
Permission
Action
__pycache__
---
0755
__init__.py
0 bytes
0644
manage.py
273 bytes
0644
models.py
250 bytes
0644
settings.py
261 bytes
0644
test_compare.py
2932 bytes
0644
test_shouldraise.py
628 bytes
0644
N4ST4R_ID | Naxtarrr