def test_one_vollume_cant_have_multiple_root_chunks(self):
new_chunk = VollumeChunk(
vollume=self.vollume,
author=create_and_save_dummy_user(username='Stevo'),
text='top stuff'
)
with self.assertRaises(ValidationError) as caught:
new_chunk.full_clean()
error_messages = caught.exception.message_dict[NON_FIELD_ERRORS]
self.assertIn("A Vollume can't have more than one starting paragraph.", error_messages)
评论列表
文章目录