Ejemplo n.º 1
0
    def test_comment(self):
        heso = self._make_heso()
        application.create_heso(heso)
        reponame = self._get_diff_repos()[0]

        begin_comments = application.get_all_comment(reponame)
        for i in xrange(3):
            comment = "This is test comment number {0}.".format(i + 1)
            application.add_comment(reponame, comment)
            time.sleep(0.001)  # fixme: I don't want to use sleep!
        comments = application.get_all_comment(reponame)
        self.assertEqual(len(comments), len(begin_comments) + 3)
Ejemplo n.º 2
0
    def test_comment(self):
        heso = {'description': "This is description.",
                'files': [{'filename': "heso_test.py",
                          'document': "import heso"}]}
        application.create_heso(heso)
        reponame = self._get_diff_repos()[0]

        begin_comments = application.get_all_comment(reponame)

        comment1 = "This is test comment 1."
        application.add_comment(reponame, comment1)
        time.sleep(0.001)  # fixme: I don't want to use sleep!

        comment2 = "This is test comment 2."
        application.add_comment(reponame, comment2)
        time.sleep(0.001)  # fixme: I don't want to use sleep!

        comment3 = "This is test comment 3."
        application.add_comment(reponame, comment3)

        comments = application.get_all_comment(reponame)

        self.assertEqual(len(comments), len(begin_comments) + 3)
        self.assertEqual(comments[-1], comment3)