def testRequestDataMapper(self): data = Data() sample = {'foo': 'Foo', 'bar': 'Bar'} data._data = sample inst = data.somedata testIReadMapping(self, inst, sample, ["spam"]) testIEnumerableMapping(self, inst, sample)
def testEnvironment(self): request = self._Test__new(foo='Foo', bar='Bar') try: request.environment = {} except AttributeError: pass else: raise AssertionError("Shouldn't be able to set environment") environment = request.environment testIReadMapping(self, environment, {'foo': 'Foo', 'bar': 'Bar'}, ['splat'])
def testEnvironment(self): request = self._Test__new(foo='Foo', bar='Bar') try: request.environment = {} except AttributeError: pass else: raise "Shouldn't be able to set environment" environment = request.environment testIReadMapping(self, environment, {'foo': 'Foo', 'bar': 'Bar'}, ['splat'])
def testRequestDataGettr(self): testIReadMapping(self, Data().something, {"Zope": "something Zope"}, ["spam"])