Esempio n. 1
0
        def topic(self):
            cfg = Config(defaults={
                'some_random_key': 'some_random_value'
            })

            cfg.validates_presence_of('some_random_key')
            return cfg
Esempio n. 2
0
 def topic(self):
     config = Config()
     config.ALLOWED_SOURCES = []
     ctx = Context(None, config, None)
     is_valid = loader.validate(
         ctx, 'http://www.google.com/logo.jpg'
     )
     return is_valid
Esempio n. 3
0
 def topic(self, data):
     key, default_value = data
     config_path = abspath(join(
         dirname(__file__),
         'config_vows_frec.conf'
     ))
     cfg = Config.load(config_path)
     return (getattr(cfg, key), default_value)
Esempio n. 4
0
 def topic(self):
     config = Config()
     config.ALLOWED_SOURCES = ['s.glbimg.com']
     ctx = Context(None, config, None)
     is_valid = loader.validate(ctx, 'http://s.glbimg.com/logo.jpg')
     return is_valid
Esempio n. 5
0
 def topic(self):
     cfg = Config()
     cfg.validates_presence_of('some_random_key')
Esempio n. 6
0
 def topic(self):
     return Config.get_conf_file()
Esempio n. 7
0
 def topic(self, data):
     key, default_value = data
     cfg = Config.load()
     return (getattr(cfg, key), default_value)
Esempio n. 8
0
 def topic(self):
     cfg = Config()
     return cfg.get('some_random_key', 'override')