def test_mustache_lex_string(self): renderer = LexRenderer() output = renderer.render(our_template, {'Patent': [{'title': [ 'foo-bar', 'baz'], 'link_number': u'1234'}, {'title': 'Balloons', 'link_number': u'999999'}]}) print 'output %s', output self.assertIn('1234', output) self.assertNotIn('[u', output)
def test_mustache_lex_integer(self): renderer = LexRenderer() output= renderer.render(our_other_template, {'Patent':{'title':'foo-bar','link_number':[1234], 'numRows': 10}}) print 'output %s', output self.assertIn('1234', output) self.assertIn('10', output) self.assertNotIn('[u',output)
def test_mustache_lex_list_success(self): renderer = LexRenderer() output= renderer.render(our_other_template, {'Patent':{'title':'foo-bar','link_number':[u'1234',u'5678']}}) print 'output %s', output self.assertIn('1234', output) self.assertIn('5678', output) self.assertNotIn('[u',output)
def test_mustache_lex_list_error(self): renderer = LexRenderer() with self.assertRaises(ValueError): renderer.render(our_template, {'Patent': { 'title': 'foo-bar', 'link_number': [u'1234', u'5678']}})
def test_mustache_lex(self): renderer = LexRenderer() output = renderer.render( our_template, {'Patent': {'title': 'foo-bar', 'link_number': [u'1234']}}) print 'output %s', output self.assertNotIn('[u', output)