def setUp(self): s = '' with open('tests/unicode.txt', 'rb+') as f: if sys.version_info.major == 3: s = f.read().decode() else: s = f.read() self.mgr = EtcdConfigManager(prefix=ETCD_PREFIX, host=ETCD_HOST, port=ETCD_PORT, username=ETCD_USERNAME, password=ETCD_PASSWORD) self.env_config = { "A": 1, "B": "c", "D": { "e": "f" }, "E": 1, "C": { 'c2': 1 }, 'ENCODING': s } self.mgr.set_env_defaults('test', self.env_config) self.mgr.set_config_sets({'foo': {'A': 11}, 'bar': {'C': {'c3': 2}}}) self.proxy = EtcdSettingsProxy() with open('manage.py', 'w') as f: f.write("testing artifact")
def setUp(self): self.mgr = EtcdConfigManager( dev_params=None, prefix='prefix', protocol='foo', host='foo', port=0, long_polling_timeout=50, long_polling_safety_delay=0.1) for l in self.mgr.logger.handlers: l.setLevel(logging.CRITICAL)
def setUp(self): self.env = 'unittest' EtcdClusterState.etcd_index = 0 self.mgr = EtcdConfigManager(dev_params=None, prefix=settings.ETCD_PREFIX, protocol='http', host=settings.ETCD_HOST, port=settings.ETCD_PORT, username=settings.ETCD_USERNAME, password=settings.ETCD_PASSWORD, long_polling_timeout=0.1, long_polling_safety_delay=0.1) for l in self.mgr.logger.handlers: l.setLevel(logging.CRITICAL)