示例#1
0
 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})
示例#2
0
 def test_implementation(self):
     environ = DummyEnvironment()
     info = DummyRendererInfo({
         'name': 'name',
     })
     instance = self._makeOne(info, environ)
     result = instance.implementation().render({})
     self.assertEqual(result, 'result')
示例#3
0
 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')
示例#4
0
 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')