from mediagoblin.submit import forms as submit_forms, security
from mediagoblin.processing import mark_entry_failed, ProcessMedia
from mediagoblin.messages import add_message, SUCCESS
-from mediagoblin.media_types import get_media_type_and_manager, InvalidFileType
+from mediagoblin.media_types import get_media_type_and_manager, \
+ InvalidFileType, FileTypeNotSupported
@require_active_login
This section is intended to catch exceptions raised in
mediagobling.media_types
'''
- submit_form.file.errors.append(
- e)
+
+ if isinstance(e, InvalidFileType) or \
+ isinstance(e, FileTypeNotSupported):
+ submit_form.file.errors.append(
+ e)
+ else:
+ raise
return render_to_response(
request,
## Did we redirect to the proper page? Use the right template?
assert_equal(
urlparse.urlsplit(response.location)[2],
- '/auth/forgot_password/email_sent/')
+ '/auth/login/')
assert template.TEMPLATE_TEST_CONTEXT.has_key(
- 'mediagoblin/auth/fp_email_sent.html')
+ 'mediagoblin/auth/login.html')
## Make sure link to change password is sent by email
assert len(mail.EMAIL_TEST_INBOX) == 1