def test_validate_gs_client_id_email(self):
        cfg = config.settings()._cfg
        cfg.gs_client_id_email = 'not.an.email'
        self.validator_test(cfg,
                            ['gs_client_id_email invalid value: not.an.email'])

        cfg.gs_client_id_email = '*****@*****.**'
        self.validator_test(cfg, [])
 def test_validate_gs_bucket(self):
     cfg = config.settings()._cfg
     cfg.gs_bucket = 'b@d_b1cket'
     self.validator_test(cfg, ['gs_bucket invalid value: b@d_b1cket'])
 def test_validate_sharding_letters(self):
     cfg = config.settings()._cfg
     cfg.sharding_letters = -1
     self.validator_test(cfg, ['sharding_letters must be within [0..5]'])
     cfg.sharding_letters = 6
     self.validator_test(cfg, ['sharding_letters must be within [0..5]'])
 def test_validate_default_expiration(self):
     cfg = config.settings()._cfg
     cfg.default_expiration = -1
     self.validator_test(cfg, ['default_expiration cannot be negative'])
 def test_validate_defaults_cached(self):
     self.validator_test(config.settings()._cfg, [])
 def test_validate_defaults(self):
     self.validator_test(config.settings(fresh=True)._cfg, [])