Esempio 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'")
Esempio 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'")
Esempio 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'")
Esempio 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)
Esempio n. 5
0
 def __sentry__(self):
     return compat.u('example')
Esempio 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)
Esempio 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'")
Esempio n. 8
0
 def __sentry__(self):
     return compat.u('example')