Exemplo n.º 1
0
    def test_unicode_in_python2(self):
        # 'רונית מגן'
        x = compat.u('\u05e8\u05d5\u05e0\u05d9\u05ea \u05de\u05d2\u05df')

        result = transform(x)
        assert result == compat.u(
            "u'\u05e8\u05d5\u05e0\u05d9\u05ea \u05de\u05d2\u05df'")
Exemplo n.º 2
0
    def test_unicode_in_python2(self):
        # 'רונית מגן'
        x = compat.u('\u05e8\u05d5\u05e0\u05d9\u05ea \u05de\u05d2\u05df')

        result = transform(x)
        assert result == compat.u("u'\u05e8\u05d5\u05e0\u05d9\u05ea \u05de\u05d2\u05df'")
Exemplo n.º 3
0
    def test_truncating_unicode(self):
        # 'רונית מגן'
        x = compat.u('\u05e8\u05d5\u05e0\u05d9\u05ea \u05de\u05d2\u05df')

        result = transform(x, string_max_length=5)
        assert result == compat.u("u'\u05e8\u05d5\u05e0\u05d9\u05ea'")
Exemplo n.º 4
0
 def test_string_max_length(self):
     x = compat.u('1234')
     result = transform(x, string_max_length=3)
     expected = "'123'" if compat.PY3 else "u'123'"
     self.assertEqual(result, expected)
Exemplo n.º 5
0
 def __sentry__(self):
     return compat.u('example')
Exemplo n.º 6
0
 def test_string_max_length(self):
     x = compat.u('1234')
     result = transform(x, string_max_length=3)
     expected = "'123'" if compat.PY3 else "u'123'"
     self.assertEqual(result, expected)
Exemplo n.º 7
0
    def test_truncating_unicode(self):
        # 'רונית מגן'
        x = compat.u('\u05e8\u05d5\u05e0\u05d9\u05ea \u05de\u05d2\u05df')

        result = transform(x, string_max_length=5)
        assert result == compat.u("u'\u05e8\u05d5\u05e0\u05d9\u05ea'")
Exemplo n.º 8
0
 def __sentry__(self):
     return compat.u('example')