示例#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
示例#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
示例#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
示例#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
示例#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
示例#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