Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
D
django
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
django
Commits
1a9f6db5
Kaydet (Commit)
1a9f6db5
authored
Eyl 13, 2016
tarafından
Dmitry Medvinsky
Kaydeden (comit)
Tim Graham
Eyl 20, 2016
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fixed #27219 -- Changed cx_Oracle client encoding to AL32UTF8 to allow 4-byte characters.
üst
358c6f21
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
3 deletions
+25
-3
base.py
django/db/backends/oracle/base.py
+1
-1
test_charfield.py
tests/model_fields/test_charfield.py
+12
-1
test_textfield.py
tests/model_fields/test_textfield.py
+12
-1
No files found.
django/db/backends/oracle/base.py
Dosyayı görüntüle @
1a9f6db5
...
...
@@ -41,7 +41,7 @@ def _setup_environment(environ):
_setup_environment
([
# Oracle takes client-side character set encoding from the environment.
(
'NLS_LANG'
,
'.UTF8'
),
(
'NLS_LANG'
,
'.
AL32
UTF8'
),
# This prevents unicode from getting mangled by getting encoded into the
# potentially non-unicode database character set.
(
'ORA_NCHAR_LITERAL_REPLACE'
,
'TRUE'
),
...
...
tests/model_fields/test_charfield.py
Dosyayı görüntüle @
1a9f6db5
# -*- 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
):
...
...
tests/model_fields/test_textfield.py
Dosyayı görüntüle @
1a9f6db5
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 😀.'
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment