def test_topic_is_visited(self):
        utils.login(self)
        category = utils.create_category()
        topic = utils.create_topic(category=category, user=self.user)

        self.assertFalse(Topic.objects.filter(pk=topic.pk).with_bookmarks(self.user).first().is_visited)

        CommentBookmark.objects.create(topic=topic, user=self.user)
        self.assertTrue(Topic.objects.filter(pk=topic.pk).with_bookmarks(self.user).first().is_visited)
Should return True when the topic has been visited
dataset/ETHPy150Open nitely/Spirit/spirit/topic/tests.py/TopicModelsTest.test_topic_is_visited