This doesn't rely on checking HTML output... thus, cleaner.
This commit sponsored by Alexandre Guédon. Thank you!
old_metadata = new_metadata
new_metadata = media_entry.media_metadata
assert new_metadata == old_metadata
- assert (b"'On the worst day' is not a 'date-time'" in
- response.body)
+ context = template.TEMPLATE_TEST_CONTEXT[
+ 'mediagoblin/edit/metadata.html']
+ assert context['form'].errors['media_metadata'][0]['identifier'][0] == \
+ "'On the worst day' is not a 'date-time'"