def test_parse_config_files(self): desired_conf = { 'bts': 'debian', 'check_available': True, 'check_uid': False, 'debconf': False, 'dontquery': False, 'editor': 'emacs -nw', 'email': '*****@*****.**', 'envelopefrom': '*****@*****.**', 'headers': ['X-Reportbug-Testsuite: this is the test suite'], 'http_proxy': 'http://proxy.example.com:3128/', 'interface': 'gtk2', 'keyid': 'deadbeef', 'max_attachment_size': 1024000, 'mbox_reader_cmd': 'mutt -f %s', 'mirrors': ['this_is_a_bts_mirror'], 'mode': 'novice', 'mta': '/usr/sbin/sendmail', 'nocc': False, 'nocompress': False, 'noconf': False, 'offline': True, 'paranoid': True, 'query_src': False, 'realname': 'Reportbug Maintainers', 'replyto': 'We dont care <*****@*****.**>', 'sendto': 'submit', 'severity': 'normal', 'sign': 'gpg', 'smtphost': 'reportbug.debian.org:587', 'smtppasswd': 'James Bond', 'smtptls': True, 'smtpuser': '******', 'template': True, 'verify': True } args = utils.parse_config_files() for conf in desired_conf: self.assertIn(conf, args) self.assertEqual(desired_conf[conf], args[conf]) # mua returns an instance of utils.Mua, need to check differently self.assertIn('mua', args) self.assertIsInstance(args['mua'], utils.Mua)
def test_parse_config_files(self): desired_conf = { 'bts': 'debian', 'check_available': True, 'check_uid': False, 'debconf': False, 'dontquery': False, 'editor': u'emacs -nw', 'email': u'*****@*****.**', 'envelopefrom': u'*****@*****.**', 'headers': ['X-Reportbug-Testsuite: this is the test suite'], 'http_proxy': u'http://proxy.example.com:3128/', 'interface': 'gtk2', 'keyid': u'deadbeef', 'max_attachment_size': 1024000, 'mbox_reader_cmd': u'mutt -f %s', 'mirrors': ['this_is_a_bts_mirror'], 'mode': 'novice', 'mta': u'/usr/sbin/sendmail', 'nocc': False, 'nocompress': False, 'noconf': False, 'offline': True, 'paranoid': True, 'query_src': False, 'realname': u'Reportbug Maintainers', 'replyto': u'We dont care <*****@*****.**>', 'sendto': 'submit', 'severity': 'normal', 'sign': 'gpg', 'smtphost': u'reportbug.debian.org:587', 'smtppasswd': u'James Bond', 'smtptls': True, 'smtpuser': u'Bond', 'template': True, 'verify': True} args = utils.parse_config_files() for conf in desired_conf: self.assertIn(conf, args) self.assertEqual(desired_conf[conf], args[conf]) # mua returns an instance of utils.Mua, need to check differently self.assertIn('mua', args) self.assertIsInstance(args['mua'], utils.Mua)
def test_parse_config_files(self): args = utils.parse_config_files() self.assertIsNot(args, {})