Fix 500 errors on video upload page

Some status strings were accidentally tuples thanks to stray commas, and
ugettext raised an exception as a result.

JIRA: MA-323
This commit is contained in:
Greg Price
2015-03-04 16:04:12 -05:00
parent 0eed96c2f3
commit 83c474622e
2 changed files with 16 additions and 2 deletions

View File

@@ -97,6 +97,20 @@ class VideoUploadTestMixin(object):
]
},
]
# Ensure every status string is tested
self.previous_uploads += [
{
"edx_video_id": "status_test_{}".format(status),
"client_video_id": "status_test.mp4",
"duration": 3.14,
"status": status,
"encoded_videos": [],
}
for status in (
StatusDisplayStrings._STATUS_MAP.keys() + # pylint:disable=protected-access
["non_existent_status"]
)
]
for profile in self.profiles:
create_profile(profile)
for video in self.previous_uploads:

View File

@@ -48,10 +48,10 @@ class StatusDisplayStrings(object):
# Translators: This is the status for a video that the servers have successfully processed
_COMPLETE = ugettext_noop("Complete")
# Translators: This is the status for a video that the servers have failed to process
_FAILED = ugettext_noop("Failed"),
_FAILED = ugettext_noop("Failed")
# Translators: This is the status for a video for which an invalid
# processing token was provided in the course settings
_INVALID_TOKEN = ugettext_noop("Invalid Token"),
_INVALID_TOKEN = ugettext_noop("Invalid Token")
# Translators: This is the status for a video that is in an unknown state
_UNKNOWN = ugettext_noop("Unknown")