def test_parameterized_codec_plain_no_interpolation(self): """Test parameterized codec plain no interpolation.""" expected = u'Test Without Interpolation Here' out = parameterized_codec(u'Test Without Interpolation Here', False) self.assertEqual(GenericHelperFn, out.__class__) self.assertTemplateEqual(expected, out)
def test_parameterized_codec_plain(self): """Test parameterized codec plain.""" expected = Join(u'', [u'Test ', {u'Ref': u'Interpolation'}, u' Here']) out = parameterized_codec(u'Test {{Interpolation}} Here', False) self.assertEqual(GenericHelperFn, out.__class__) self.assertTemplateEqual(expected, out)
def test_parameterized_codec_plain(self): """Test parameterized codec plain.""" expected = Join(u"", [u"Test ", {u"Ref": u"Interpolation"}, u" Here"]) out = parameterized_codec(u"Test {{Interpolation}} Here", False) self.assertEqual(GenericHelperFn, out.__class__) self.assertTemplateEqual(expected, out)
def test_parameterized_codec_b64(self): """Test parameterized codec b64.""" expected = Base64( Join(u'', [u'Test ', { u'Ref': u'Interpolation' }, u' Here'])) out = parameterized_codec(u'Test {{Interpolation}} Here', True) self.assertEqual(Base64, out.__class__) self.assertTemplateEqual(expected, out)
def test_parameterized_codec_b64(self): """Test parameterized codec b64.""" expected = Base64( Join(u"", [u"Test ", { u"Ref": u"Interpolation" }, u" Here"])) out = parameterized_codec(u"Test {{Interpolation}} Here", True) self.assertEqual(Base64, out.__class__) self.assertTemplateEqual(expected, out)