Example #1
0
    def test_save_old_version_error(self):
        """
        save_old_version method must not save old version of post
        for new post, it must raise exception instead
        """
        text = 'text'
        name = 'name'
        post = Post(text=text,
                    name=name)

        with self.assertRaises(Exception):
            post._save_old_version()