def test_use_default_if_sync_delay_setting_is_invalid(self): config_settings = [{ 'sync_delay_in_seconds': 'abc' }, { 'sync_delay_in_seconds': -1 }] for config_setting in config_settings: self.assertEqual( exp.load_setting_sync_delay(logger, config_setting), exp.DEFAULT_SYNC_DELAY_IN_SECONDS)
def test_use_user_supplied_sync_delay_if_valid(self): config_setting = {'sync_delay_in_seconds': 500} self.assertEqual(exp.load_setting_sync_delay(logger, config_setting), config_setting['sync_delay_in_seconds'])