Example #1
0
 def test_getbool__returns_default_when_scoped_param_not_exists(self):
     userdata = UserData({})
     config = UserDataNamespace("my.scope", userdata)
     assert config.getint("UNKNOWN_PARAM", True) == True
     assert config.getint("UNKNOWN_PARAM", False) == False
Example #2
0
 def test_getint__returns_default_when_scoped_param_not_exists(self):
     userdata = UserData({})
     config = UserDataNamespace("my.scope", userdata)
     assert config.getint("UNKNOWN_PARAM", 123) == 123
     assert config.getint("UNKNOWN_PARAM", 321) == 321
Example #3
0
 def test_getint__retrieves_value_when_scoped_param_exists(self):
     userdata = UserData({"my.scope.param2": "12"})
     config = UserDataNamespace("my.scope", userdata)
     assert config.getint("param2") == 12
Example #4
0
 def test_getbool__returns_default_when_scoped_param_not_exists(self):
     userdata = UserData({})
     config = UserDataNamespace("my.scope", userdata)
     assert config.getint("UNKNOWN_PARAM", True)  == True
     assert config.getint("UNKNOWN_PARAM", False) == False
Example #5
0
 def test_getint__returns_default_when_scoped_param_not_exists(self):
     userdata = UserData({})
     config = UserDataNamespace("my.scope", userdata)
     assert config.getint("UNKNOWN_PARAM", 123) == 123
     assert config.getint("UNKNOWN_PARAM", 321) == 321
Example #6
0
 def test_getint__retrieves_value_when_scoped_param_exists(self):
     userdata = UserData({"my.scope.param2": "12"})
     config = UserDataNamespace("my.scope", userdata)
     assert config.getint("param2") == 12