def test_flag_set_with_number(self):
     """
     flag_set() returns False if the setting is present but
     not equal to 'true'.
     """
     self.prepare_config("b", {"y": "123"})
     self.assertFalse(config.flag_set("b", "y"))
 def test_flag_set_with_text_but_not_true(self):
     """
     flag_set() returns False if the setting is present but
     not equal to 'true'.
     """
     self.prepare_config("c", {"x": "blah"})
     self.assertFalse(config.flag_set("c", "x"))
Exemple #3
0
 def test_flag_set_with_text_but_not_true(self):
     """
     flag_set() returns False if the setting is present but
     not equal to 'true'.
     """
     self.prepare_config("c", {"x": "blah"})
     self.assertFalse(config.flag_set("c", "x"))
 def test_flag_set_with_absent_key(self):
     """
     flag_set() returns False if the setting
     is not present in the configuration file.
     """
     self.prepare_config("a")
     self.assertFalse(config.flag_set("a", "z"))
Exemple #5
0
 def test_flag_set_with_number(self):
     """
     flag_set() returns False if the setting is present but
     not equal to 'true'.
     """
     self.prepare_config("b", {"y": "123"})
     self.assertFalse(config.flag_set("b", "y"))
Exemple #6
0
 def test_flag_set_with_absent_key(self):
     """
     flag_set() returns False if the setting
     is not present in the configuration file.
     """
     self.prepare_config("a")
     self.assertFalse(config.flag_set("a", "z"))
 def test_flag_set_with_True(self):
     """
     flag_set() returns True if the setting is present and equal to 'true'.
     """
     self.prepare_config("e", {"v": " True 	 "})
     self.assertTrue(config.flag_set("e", "v"))
Exemple #8
0
def debug_stats_enabled():
    """True if debug statistics counters are enabled."""
    return config.flag_set("statistics", "debug")
Exemple #9
0
def cache_connections():
    """True if kvs connections should be cached."""
    return config.flag_set("kvs", "cache_connections")
Exemple #10
0
 def test_flag_set_with_True(self):
     """
     flag_set() returns True if the setting is present and equal to 'true'.
     """
     self.prepare_config("e", {"v": " True 	 "})
     self.assertTrue(config.flag_set("e", "v"))
Exemple #11
0
def cache_connections():
    """True if kvs connections should be cached."""
    return config.flag_set("kvs", "cache_connections")
Exemple #12
0
def debug_stats_enabled():
    """True if debug statistics counters are enabled."""
    return config.flag_set("statistics", "debug")