Exemplo n.º 1
0
    def test_config_file_from_json(self):
        json_config = ''.join([
            '{"username": "******", "hostname": "imap.example.org", ',
            '"format_list": "\\nID:         {uid}\\nFlags:      ',
            '{flags}\\nFrom:       {from}\\nTo:         {to}\\nDate:       ',
            '{date}\\nSubject:    {subject}", "ssl": true, "limit": 10, ',
            '"format_status": "{directory:>20} : {count:>5} Mails - ',
            '{unseen:>5} Unseen - {recent:>5} Recent", "password": "******"}',
        ])
        self.conf = config.new_context(json.loads(json_config))

        for key, value in config.DEFAULT_CONFIG.items():
            assert self.conf[key] == value
Exemplo n.º 2
0
    def test_config_file_from_json(self):
        json_config = ''.join([
            '{"username": "******", "hostname": "imap.example.org", ',
            '"format_list": "\\nID:         {uid}\\nFlags:      ',
            '{flags}\\nFrom:       {from}\\nTo:         {to}\\nDate:       ',
            '{date}\\nSubject:    {subject}", "ssl": true, "limit": 10, ',
            '"format_status": "{directory:>20} : {count:>5} Mails - ',
            '{unseen:>5} Unseen - {recent:>5} Recent", "password": "******"}',
        ])
        self.conf = config.new_context(json.loads(json_config))

        for key, value in config.DEFAULT_CONFIG.items():
            assert self.conf[key] == value
Exemplo n.º 3
0
    def test_default_config(self):
        self.conf = config.new_context()

        for key, value in config.DEFAULT_CONFIG.items():
            assert self.conf[key] == value
Exemplo n.º 4
0
    def test_default_config(self):
        self.conf = config.new_context()

        for key, value in config.DEFAULT_CONFIG.items():
            assert self.conf[key] == value