Much more nicely formed form error check
This doesn't rely on checking HTML output... thus, cleaner. This commit sponsored by Alexandre Guédon. Thank you!
This commit is contained in:
parent
16450dada2
commit
dd41141d23
@ -250,5 +250,7 @@ class TestMetaDataEdit:
|
||||
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'"
|
||||
|
Loading…
x
Reference in New Issue
Block a user