def test_apt_listchanges(self):
     # test with sendmail available
     unattended_upgrade.SENDMAIL_BINARY = "/bin/true"
     setup_apt_listchanges("./data/listchanges.conf.mail")
     self.assertEqual(os.environ["APT_LISTCHANGES_FRONTEND"], "mail")
     # test without sendmail
     unattended_upgrade.SENDMAIL_BINARY = "/bin/not-here-xxxxxxxxx"
     setup_apt_listchanges("./data/listchanges.conf.pager")
     self.assertEqual(os.environ["APT_LISTCHANGES_FRONTEND"], "none")
예제 #2
0
 def test_apt_listchanges(self):
     # test with sendmail available
     unattended_upgrade.SENDMAIL_BINARY="/bin/true"
     setup_apt_listchanges("./data/listchanges.conf.mail")
     self.assertEqual(os.environ["APT_LISTCHANGES_FRONTEND"], "mail")
     # test without sendmail
     unattended_upgrade.SENDMAIL_BINARY="/bin/not-here-xxxxxxxxx"
     setup_apt_listchanges("./data/listchanges.conf.pager")
     self.assertEqual(os.environ["APT_LISTCHANGES_FRONTEND"], "none")