test_models.py 文件源码

python
阅读 23 收藏 0 点赞 0 评论 0

项目:volla 作者: sgrowe 项目源码 文件源码
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)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号