예제 #1
0
 def test_readmailcapfile(self):
     # Test readmailcapfile() using test file. It should match MAILCAPDICT.
     with open(MAILCAPFILE, 'r') as mcf:
         with self.assertWarns(DeprecationWarning):
             d = mailcap.readmailcapfile(mcf)
     self.assertDictEqual(d, MAILCAPDICT_DEPRECATED)
예제 #2
0
 def test_readmailcapfile(self):
     # Test readmailcapfile() using test file. It should match MAILCAPDICT.
     with open(MAILCAPFILE, 'r') as mcf:
         d = mailcap.readmailcapfile(mcf)
     self.assertDictEqual(d, MAILCAPDICT)
예제 #3
0
 def test_readmailcapfile(self):
     # Test readmailcapfile() using test file. It should match MAILCAPDICT.
     with open(MAILCAPFILE, 'r') as mcf:
         d = mailcap.readmailcapfile(mcf)
     self.assertDictEqual(d, MAILCAPDICT)
예제 #4
0
 def test_readmailcapfile(self):
     # Test readmailcapfile() using test file. It should match MAILCAPDICT.
     with open(MAILCAPFILE, 'r') as mcf:
         with self.assertWarns(DeprecationWarning):
             d = mailcap.readmailcapfile(mcf)
     self.assertDictEqual(d, MAILCAPDICT_DEPRECATED)
예제 #5
0
파일: utils.py 프로젝트: pena-ara/tg
def get_mailcap() -> Dict:
    if config.MAILCAP_FILE:
        with open(config.MAILCAP_FILE) as f:
            return mailcap.readmailcapfile(f)  # type: ignore
    return mailcap.getcaps()
예제 #6
0
파일: nodes.py 프로젝트: xxoolm/Ryven
 def update_event(self, inp=-1):
     self.set_output_val(0, mailcap.readmailcapfile(self.input(0)))
예제 #7
0
 def test_readmailcapfile(self):
     with open(MAILCAPFILE, 'r') as mcf:
         with self.assertWarns(DeprecationWarning):
             d = mailcap.readmailcapfile(mcf)
     self.assertDictEqual(d, MAILCAPDICT_DEPRECATED)