Fixes after merging video into master - part 2
- Added handling of InvalidFileType to submit.views - Updated test_celery_setup and test_submission tests to reflect the changes to the media procesing infrastructure
This commit is contained in:
@@ -50,7 +50,7 @@ def test_setup_celery_from_config():
|
||||
assert isinstance(fake_celery_module.CELERYD_ETA_SCHEDULER_PRECISION, float)
|
||||
assert fake_celery_module.CELERY_RESULT_PERSISTENT is True
|
||||
assert fake_celery_module.CELERY_IMPORTS == [
|
||||
'foo.bar.baz', 'this.is.an.import', 'mediagoblin.process_media']
|
||||
'foo.bar.baz', 'this.is.an.import', 'mediagoblin.processing']
|
||||
assert fake_celery_module.CELERY_MONGODB_BACKEND_SETTINGS == {
|
||||
'database': 'mediagoblin'}
|
||||
assert fake_celery_module.CELERY_RESULT_BACKEND == 'mongodb'
|
||||
@@ -74,7 +74,7 @@ def test_setup_celery_from_config():
|
||||
assert isinstance(fake_celery_module.CELERYD_ETA_SCHEDULER_PRECISION, float)
|
||||
assert fake_celery_module.CELERY_RESULT_PERSISTENT is False
|
||||
assert fake_celery_module.CELERY_IMPORTS == [
|
||||
'baz.bar.foo', 'import.is.a.this', 'mediagoblin.process_media']
|
||||
'baz.bar.foo', 'import.is.a.this', 'mediagoblin.processing']
|
||||
assert fake_celery_module.CELERY_MONGODB_BACKEND_SETTINGS == {
|
||||
'database': 'captain_lollerskates',
|
||||
'host': 'mongodb.example.org',
|
||||
|
||||
@@ -222,7 +222,7 @@ class TestSubmission:
|
||||
|
||||
context = template.TEMPLATE_TEST_CONTEXT['mediagoblin/submit/start.html']
|
||||
form = context['submit_form']
|
||||
assert form.file.errors == ['The file doesn\'t seem to be an image!']
|
||||
assert form.file.errors == [u'Invalid file type.']
|
||||
|
||||
# NOTE: The following 2 tests will ultimately fail, but they
|
||||
# *will* pass the initial form submission step. Instead,
|
||||
@@ -246,7 +246,7 @@ class TestSubmission:
|
||||
assert_equal(entry['state'], 'failed')
|
||||
assert_equal(
|
||||
entry['fail_error'],
|
||||
u'mediagoblin.process_media.errors:BadMediaFail')
|
||||
u'mediagoblin.processing:BadMediaFail')
|
||||
|
||||
# Test non-supported file with .png extension
|
||||
# -------------------------------------------
|
||||
@@ -266,4 +266,4 @@ class TestSubmission:
|
||||
assert_equal(entry['state'], 'failed')
|
||||
assert_equal(
|
||||
entry['fail_error'],
|
||||
u'mediagoblin.process_media.errors:BadMediaFail')
|
||||
u'mediagoblin.processing:BadMediaFail')
|
||||
|
||||
Reference in New Issue
Block a user