def test_getLanguage(self): """ Test that getLanguage( ) examines config. """ self.assertEquals( getLanguage(ConfigDict({"Localization": { "Language": "xyzzy" }})), "xyzzy")
def getMailSender(cls): """ Instantiate and return a singleton MailSender object @return: a MailSender """ if cls.mailSender is None: if config.Scheduling.iMIP.Enabled: settings = config.Scheduling.iMIP.Sending smtpSender = SMTPSender(settings.Username, settings.Password, settings.UseSSL, settings.Server, settings.Port) cls.mailSender = MailSender(settings.Address, settings.SuppressionDays, smtpSender, getLanguage(config)) return cls.mailSender
def test_getLanguage(self): """ Test that getLanguage( ) examines config. """ self.assertEquals(getLanguage(ConfigDict({"Localization" : {"Language" : "xyzzy"}})), "xyzzy")