'Common implementation of L{test_serializedAttributeWithSanitization}
and L{test_serializedDeferredAttributeWithSanitization},
L{test_serializedAttributeWithTransparentTag}.
@param wrapData: A 1-argument callable that wraps around the
attribute\'s value so other tests can customize it.
@param wrapData: callable taking L{bytes} and returning something
flattenable
@param wrapTag: A 1-argument callable that wraps around the outer tag
so other tests can customize it.
@type wrapTag: callable taking L{Tag} and returning L{Tag}.'

def checkAttributeSanitization(self, wrapData, wrapTag):

    self.assertFlattensImmediately(wrapTag(tags.img(src=wrapData('<>&"'))), '<img    src="&lt;&gt;&amp;&quot;"    />')
