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
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
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