def test_set_encrypted__when_key_already_in_secrets__no_duplicates(self):
     config = UltraConfig([], encrypter=self.encrypter)
     config[config.secrets_config_key] = ['blah']
     config.set_encrypted('blah', 'blah')
     self.assertListEqual(['blah'], config[config.secrets_config_key])
 def test_set_encrypted__when_not_encrypted__set_raw_value(self):
     config = UltraConfig([], encrypter=self.encrypter)
     config.decrypted = True
     config.set_encrypted('blah', 'something')
     self.assertEqual('something', config['blah'])
 def test_set_encrypted__ensure_secrets_config_key_extended(self):
     config = UltraConfig([], encrypter=self.encrypter)
     config.set_encrypted('blah', 'blah')
     self.assertListEqual(['blah'], config[config.secrets_config_key])
 def test_set_encrypted__when_encrypted__encrypt_and_set(self):
     config = UltraConfig([], encrypter=self.encrypter)
     config.set_encrypted('blah', 'something')
     self.assertEqual('blah', config['blah'])
Beispiel #5
0
 def test_set_encrypted__when_key_already_in_secrets__no_duplicates(self):
     config = UltraConfig([], encrypter=self.encrypter)
     config[config.secrets_config_key] = ['blah']
     config.set_encrypted('blah', 'blah')
     self.assertListEqual(['blah'], config[config.secrets_config_key])
Beispiel #6
0
 def test_set_encrypted__ensure_secrets_config_key_extended(self):
     config = UltraConfig([], encrypter=self.encrypter)
     config.set_encrypted('blah', 'blah')
     self.assertListEqual(['blah'], config[config.secrets_config_key])
Beispiel #7
0
 def test_set_encrypted__when_not_encrypted__set_raw_value(self):
     config = UltraConfig([], encrypter=self.encrypter)
     config.decrypted = True
     config.set_encrypted('blah', 'something')
     self.assertEqual('something', config['blah'])
Beispiel #8
0
 def test_set_encrypted__when_encrypted__encrypt_and_set(self):
     config = UltraConfig([], encrypter=self.encrypter)
     config.set_encrypted('blah', 'something')
     self.assertEqual('blah', config['blah'])