Closed szuliq closed 10 years ago
You are right, it cannot be raised. It is a historical artefact, after refactoring of VideoBackend.__init__
it lost sense. Don't you want to remove it all directly? Together with the test EmbedVideoFormFieldTestCase.test_validation_unknownid
[1].
[1] https://github.com/yetty/django-embed-video/blob/master/embed_video/tests/tests_fields.py#L36
Personally I do call get_code()
in is_valid()
and I think catching it and raising ValidationError
is a perfectly valid case.
Ok.
There is a lot of spaces in this error message.
By the way, this is never raised in normal condition. The
detect_backend
doesn't try toget_code()
at all.