def test_get__returns_default_when_scoped_param_not_exists(self): config = UserDataNamespace("my.scope", UserData({})) assert config.get("UNKNOWN_PARAM", "DEFAULT1") == "DEFAULT1" assert config.get("UNKNOWN_PARAM", "DEFAULT2") == "DEFAULT2"
def test_get__retrieves_value_when_scoped_param_exists(self): userdata = UserData({"my.scope.param1": 12}) config = UserDataNamespace("my.scope", userdata) assert config.get("param1") == 12 assert config["param1"] == 12