mirror of
https://github.com/django/django.git
synced 2025-10-23 21:59:11 +00:00
Fixed #27219 -- Changed cx_Oracle client encoding to AL32UTF8 to allow 4-byte characters.
This commit is contained in:
committed by
Tim Graham
parent
358c6f21f8
commit
1a9f6db5ff
@@ -1,4 +1,9 @@
|
||||
from django.db import models
|
||||
# -*- coding: utf-8 -*-
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from unittest import skipIf
|
||||
|
||||
from django.db import connection, models
|
||||
from django.test import TestCase
|
||||
|
||||
from .models import Post
|
||||
@@ -23,3 +28,9 @@ class TextFieldTests(TestCase):
|
||||
|
||||
def test_lookup_integer_in_textfield(self):
|
||||
self.assertEqual(Post.objects.filter(body=24).count(), 0)
|
||||
|
||||
@skipIf(connection.vendor == 'mysql', 'See https://code.djangoproject.com/ticket/18392')
|
||||
def test_emoji(self):
|
||||
p = Post.objects.create(title='Whatever', body='Smile 😀.')
|
||||
p.refresh_from_db()
|
||||
self.assertEqual(p.body, 'Smile 😀.')
|
||||
|
||||
Reference in New Issue
Block a user