コード例 #1
0
    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)
コード例 #2
0
    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)
コード例 #3
0
    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)
コード例 #4
0
    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)
コード例 #5
0
    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)