def METHOD_NAME(self):
    registry = getUtility(IRegistry)
    registry["plone.patternoptions"] = {"foo": '{"foo": "bar"}'}
    settings = PatternsSettingsView(self.folder, self.layer["request"])
    result = settings()
    self.assertEqual(result["data-pat-foo"], '{"foo": "bar"}')