mirror of
https://github.com/django/django.git
synced 2025-08-04 02:48:35 +00:00
Fixed #27219 -- Changed cx_Oracle client encoding to AL32UTF8 to allow 4-byte characters.
This commit is contained in:
parent
358c6f21f8
commit
1a9f6db5ff
3 changed files with 25 additions and 3 deletions
|
@ -1,5 +1,10 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from unittest import skipIf
|
||||
|
||||
from django.core.exceptions import ValidationError
|
||||
from django.db import models
|
||||
from django.db import connection, models
|
||||
from django.test import SimpleTestCase, TestCase
|
||||
from django.utils.functional import lazy
|
||||
|
||||
|
@ -21,6 +26,12 @@ class TestCharField(TestCase):
|
|||
def test_lookup_integer_in_charfield(self):
|
||||
self.assertEqual(Post.objects.filter(title=9).count(), 0)
|
||||
|
||||
@skipIf(connection.vendor == 'mysql', 'See https://code.djangoproject.com/ticket/18392')
|
||||
def test_emoji(self):
|
||||
p = Post.objects.create(title='Smile 😀', body='Whatever.')
|
||||
p.refresh_from_db()
|
||||
self.assertEqual(p.title, 'Smile 😀')
|
||||
|
||||
|
||||
class ValidationTests(SimpleTestCase):
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue