def test_call_with_nondict_value(self): environ = DummyEnvironment() info = DummyRendererInfo({ 'name': 'name', }) instance = self._makeOne(info, environ) self.assertRaises(ValueError, instance, None, {'context': 1})
def test_implementation(self): environ = DummyEnvironment() info = DummyRendererInfo({ 'name': 'name', }) instance = self._makeOne(info, environ) result = instance.implementation().render({}) self.assertEqual(result, 'result')
def test_call(self): environ = DummyEnvironment() info = DummyRendererInfo({ 'name': 'name', }) instance = self._makeOne(info, environ) result = instance({}, {'system': 1}) self.assertTrue(isinstance(result, text_type)) self.assertEqual(result, 'result')
def test_call(self): environ = DummyEnvironment() info = DummyRendererInfo({ 'name': 'name', }) instance = self._makeOne(info, environ) result = instance({}, {'system': 1}) self.failUnless(isinstance(result, unicode)) self.assertEqual(result, u'result')