def test_necessario(self):
        self.assertTrue(self.seg_p)

        seg_p2 = itau.registros.SegmentoP()
        self.assertFalse(seg_p2.necessario())

        seg_p2.controle_banco = 33
        self.assertFalse(seg_p2.necessario())

        seg_p2.vencimento_titulo = 10102012
        self.assertTrue(seg_p2.necessario())
def __init__(self, reddit, term, config, oauth, url=None, submission=None):
        super(SubmissionPage, self).__init__(reddit, term, config, oauth)

        self.controller = SubmissionController(self, keymap=config.keymap)

        if url:
            self.content = SubmissionContent.from_url(
                reddit, url, term.loader,
                max_comment_cols=config['max_comment_cols'])
        else:
            self.content = SubmissionContent(
                submission, term.loader,
                max_comment_cols=config['max_comment_cols'])
        # Start at the submission post, which is indexed as -1
        self.nav = Navigator(self.content.get, page_index=-1)
        self.selected_subreddit = None