test yaml can be a dict or string