def test__purgeMarkers(self): obj = self.helpers.context self._populate(obj) self.failUnless(IDummyMarker.providedBy(obj)) self.helpers._purgeMarkers() self.failIf(IDummyMarker.providedBy(obj))
def test__purgeMarkers(self): from Products.GenericSetup.testing import IDummyMarker helpers = self._makeOne() obj = helpers.context self._populate(obj) self.failUnless(IDummyMarker.providedBy(obj)) helpers._purgeMarkers() self.failIf(IDummyMarker.providedBy(obj))
def test__initMarkers(self): node = parseString(_NORMAL_MARKER_EXPORT).documentElement self.helpers._initMarkers(node) self.failUnless(IDummyMarker.providedBy(self.helpers.context)) doc = self.helpers._doc = PrettyDocument() node = doc.createElement('dummy') node.appendChild(self.helpers._extractMarkers()) doc.appendChild(node) self.assertEqual(doc.toprettyxml(' '), _NORMAL_MARKER_EXPORT)
def test__initMarkers(self): from Products.GenericSetup.utils import PrettyDocument from Products.GenericSetup.testing import IDummyMarker helpers = self._makeOne() node = _getDocumentElement(_NORMAL_MARKER_EXPORT) helpers._initMarkers(node) self.failUnless(IDummyMarker.providedBy(helpers.context)) doc = helpers._doc = PrettyDocument() node = doc.createElement('dummy') node.appendChild(helpers._extractMarkers()) doc.appendChild(node) self.assertEqual(doc.toprettyxml(' '), _NORMAL_MARKER_EXPORT)