def test_delete_then_list(self):
        cda = CommentDataAccess("test.ini")
        cda.load()
        cda.delete_comment_by_id("id1")

        allCmt = cda.list_all_comments()
        self.assertEqual(len(allCmt), 2)
        
        self.assertEqual(allCmt[0].get_id(), "id2")
        self.assertEqual(allCmt[0].get_user_id(), "user2")
        self.assertEqual(allCmt[0].get_message(), "message2")
        self.assertEqual(allCmt[0].get_time_as_str(), "06/10/15 12:00:00")
        
        self.assertEqual(allCmt[1].get_id(), "id3")
        self.assertEqual(allCmt[1].get_user_id(), "user3")
        self.assertEqual(allCmt[1].get_message(), "message3")
        self.assertEqual(allCmt[1].get_time_as_str(), "06/11/15 12:00:00")
    def test_delete_then_save(self):
        cda = CommentDataAccess("test.ini")
        cda.load()
        cda.delete_comment_by_id("id1")

        cda.save()

        with open("test.ini", "rt") as f:
            self.assertEqual(f.readline(), "[id2]\n")
            self.assertEqual(f.readline(), "time = 06/10/15 12:00:00\n")
            self.assertEqual(f.readline(), "user id = user2\n")
            self.assertEqual(f.readline(), "message = message2\n")

            self.assertEqual(f.readline(), "\n")

            self.assertEqual(f.readline(), "[id3]\n")
            self.assertEqual(f.readline(), "time = 06/11/15 12:00:00\n")
            self.assertEqual(f.readline(), "user id = user3\n")
            self.assertEqual(f.readline(), "message = message3\n")

            self.assertEqual(f.readline(), "\n")
            self.assertEqual(f.readline(), "")