except ImportError, exc:
mark_entry_failed(entry[u'_id'], exc)
- entry['state'] = u'processed'
+ entry.state = u'processed'
entry.save()
def on_failure(self, exc, task_id, args, kwargs, einfo):
entry = mg_globals.database.MediaEntry.find_one(
{'title': 'Malicious Upload 2'})
- assert_equal(entry['state'], 'failed')
+ assert_equal(entry.state, 'failed')
assert_equal(
entry['fail_error'],
u'mediagoblin.processing:BadMediaFail')
entry = mg_globals.database.MediaEntry.find_one(
{'title': 'Malicious Upload 3'})
- assert_equal(entry['state'], 'failed')
+ assert_equal(entry.state, 'failed')
assert_equal(
entry['fail_error'],
u'mediagoblin.processing:BadMediaFail')