More and better test failure messages

This commit is contained in:
reverend 2020-09-13 19:17:04 +02:00
parent 1fb71a172e
commit b52d96a55e

View File

@ -72,9 +72,21 @@ class SubmittableTestCase(ModelTestCase):
)
self.assertTrue(
submitted_by.null,
msg='Expecting the sub'
msg='Expecting %s to has null=True' % (
str(submitted_by)
)
self.assertTrue(submitted_by.blank)
)
self.assertTrue(
submitted_by.blank,
msg='Expecting %s to has blank=True' % (
str(submitted_by)
)
)
self.assertEqual(
submitted_by.remote_field.on_delete, models.SET_NULL)
submitted_by.remote_field.on_delete,
models.SET_NULL
msg='Expecting %s to be null when reference is delete (models.SET_NULL)' % (
str(submitted_by)
)
)