def testCommentDisplayedWhenProvided(self):
        # A comment provided to the constructor should appear when
        # rendered.
        my_comment = ("this comment should be displayed with the sources."
                      "list entries.")

        view = SourcesListEntriesView(
            self.entries, LaunchpadTestRequest(), comment=my_comment)
        view.initialize()

        html = view.__call__()
        self.assertTrue('#' + my_comment in html,
            "The comment was not included in the sources.list snippet.")
    def testCommentDisplayedWhenProvided(self):
        # A comment provided to the constructor should appear when
        # rendered.
        my_comment = ("this comment should be displayed with the sources."
                      "list entries.")

        view = SourcesListEntriesView(self.entries,
                                      LaunchpadTestRequest(),
                                      comment=my_comment)
        view.initialize()

        html = view.__call__()
        self.assertTrue(
            '#' + my_comment in html,
            "The comment was not included in the sources.list snippet.")