Example #1
0
 def test_normal_variable_fields_should_not_be_hidden(
         self, sensitive_variable_fields, key, expected_result):
     with conf_vars({
         ('admin', 'sensitive_variable_fields'):
             str(sensitive_variable_fields)
     }):
         assert expected_result == utils.should_hide_value_for_key(key)
Example #2
0
 def test_sensitive_variable_fields_should_be_hidden(
         self, sensitive_variable_fields, key, expected_result):
     with conf_vars({
         ('admin', 'sensitive_variable_fields'):
             str(sensitive_variable_fields)
     }):
         self.assertEqual(expected_result,
                          utils.should_hide_value_for_key(key))
Example #3
0
 def test_sensitive_variable_should_be_hidden_ic(self):
     assert utils.should_hide_value_for_key("GOOGLE_API_KEY")
Example #4
0
 def test_sensitive_variable_should_be_hidden(self):
     assert utils.should_hide_value_for_key("google_api_key")
Example #5
0
 def test_normal_variable_should_not_be_hidden(self):
     assert not utils.should_hide_value_for_key("key")
Example #6
0
 def test_empty_variable_should_not_be_hidden(self):
     assert not utils.should_hide_value_for_key("")
     assert not utils.should_hide_value_for_key(None)
Example #7
0
 def test_normal_variable_should_not_be_hidden(self):
     self.assertFalse(utils.should_hide_value_for_key("key"))
Example #8
0
 def test_empty_variable_should_not_be_hidden(self):
     self.assertFalse(utils.should_hide_value_for_key(""))
     self.assertFalse(utils.should_hide_value_for_key(None))
Example #9
0
 def test_sensitive_variable_should_be_hidden_ic(self):
     self.assertTrue(utils.should_hide_value_for_key("GOOGLE_API_KEY"))
Example #10
0
 def test_sensitive_variable_should_be_hidden(self):
     self.assertTrue(utils.should_hide_value_for_key("google_api_key"))
Example #11
0
 def test_normal_variable_should_not_be_hidden(self):
     self.assertFalse(utils.should_hide_value_for_key("key"))
Example #12
0
 def test_empty_variable_should_not_be_hidden(self):
     self.assertFalse(utils.should_hide_value_for_key(""))
     self.assertFalse(utils.should_hide_value_for_key(None))