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
664c038f
Kaydet (Commit)
664c038f
authored
Şub 16, 2015
tarafından
Tim Graham
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Moved contrib.contenttypes tests out of contrib.
üst
35f0cae1
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
42 additions
and
44 deletions
+42
-44
__init__.py
django/contrib/contenttypes/tests/__init__.py
+0
-0
models.py
django/contrib/contenttypes/tests/models.py
+0
-43
models.py
tests/contenttypes_tests/models.py
+41
-0
test_models.py
tests/contenttypes_tests/test_models.py
+0
-0
runtests.py
tests/runtests.py
+1
-1
No files found.
django/contrib/contenttypes/tests/__init__.py
deleted
100644 → 0
Dosyayı görüntüle @
35f0cae1
django/contrib/contenttypes/tests/models.py
deleted
100644 → 0
Dosyayı görüntüle @
35f0cae1
from
django.db
import
models
from
django.utils.encoding
import
python_2_unicode_compatible
from
django.utils.http
import
urlquote
class
ConcreteModel
(
models
.
Model
):
name
=
models
.
CharField
(
max_length
=
10
)
class
ProxyModel
(
ConcreteModel
):
class
Meta
:
proxy
=
True
@python_2_unicode_compatible
class
FooWithoutUrl
(
models
.
Model
):
"""
Fake model not defining ``get_absolute_url`` for
ContentTypesTests.test_shortcut_view_without_get_absolute_url()
"""
name
=
models
.
CharField
(
max_length
=
30
,
unique
=
True
)
def
__str__
(
self
):
return
self
.
name
class
FooWithUrl
(
FooWithoutUrl
):
"""
Fake model defining ``get_absolute_url`` for
ContentTypesTests.test_shortcut_view().
"""
def
get_absolute_url
(
self
):
return
"/users/
%
s/"
%
urlquote
(
self
.
name
)
class
FooWithBrokenAbsoluteUrl
(
FooWithoutUrl
):
"""
Fake model defining a ``get_absolute_url`` method containing an error
"""
def
get_absolute_url
(
self
):
return
"/users/
%
s/"
%
self
.
unknown_field
tests/contenttypes_tests/models.py
Dosyayı görüntüle @
664c038f
...
@@ -2,6 +2,7 @@ from __future__ import unicode_literals
...
@@ -2,6 +2,7 @@ from __future__ import unicode_literals
from
django.db
import
models
from
django.db
import
models
from
django.utils.encoding
import
python_2_unicode_compatible
from
django.utils.encoding
import
python_2_unicode_compatible
from
django.utils.http
import
urlquote
@python_2_unicode_compatible
@python_2_unicode_compatible
...
@@ -35,3 +36,43 @@ class SchemeIncludedURL(models.Model):
...
@@ -35,3 +36,43 @@ class SchemeIncludedURL(models.Model):
def
get_absolute_url
(
self
):
def
get_absolute_url
(
self
):
return
self
.
url
return
self
.
url
class
ConcreteModel
(
models
.
Model
):
name
=
models
.
CharField
(
max_length
=
10
)
class
ProxyModel
(
ConcreteModel
):
class
Meta
:
proxy
=
True
@python_2_unicode_compatible
class
FooWithoutUrl
(
models
.
Model
):
"""
Fake model not defining ``get_absolute_url`` for
ContentTypesTests.test_shortcut_view_without_get_absolute_url()
"""
name
=
models
.
CharField
(
max_length
=
30
,
unique
=
True
)
def
__str__
(
self
):
return
self
.
name
class
FooWithUrl
(
FooWithoutUrl
):
"""
Fake model defining ``get_absolute_url`` for
ContentTypesTests.test_shortcut_view().
"""
def
get_absolute_url
(
self
):
return
"/users/
%
s/"
%
urlquote
(
self
.
name
)
class
FooWithBrokenAbsoluteUrl
(
FooWithoutUrl
):
"""
Fake model defining a ``get_absolute_url`` method containing an error
"""
def
get_absolute_url
(
self
):
return
"/users/
%
s/"
%
self
.
unknown_field
django/contrib/contenttypes/tests/test
s.py
→
tests/contenttypes_tests/test_model
s.py
Dosyayı görüntüle @
664c038f
File moved
tests/runtests.py
Dosyayı görüntüle @
664c038f
...
@@ -144,7 +144,7 @@ def setup(verbosity, test_labels):
...
@@ -144,7 +144,7 @@ def setup(verbosity, test_labels):
# these 'tests.migrations' modules don't actually exist, but this lets
# these 'tests.migrations' modules don't actually exist, but this lets
# us skip creating migrations for the test models.
# us skip creating migrations for the test models.
'auth'
:
'django.contrib.auth.tests.migrations'
,
'auth'
:
'django.contrib.auth.tests.migrations'
,
'contenttypes'
:
'
django.contrib.contenttypes.
tests.migrations'
,
'contenttypes'
:
'
contenttypes_
tests.migrations'
,
}
}
if
verbosity
>
0
:
if
verbosity
>
0
:
...
...
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