patching and queries tests