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
417da8a7
Kaydet (Commit)
417da8a7
authored
Haz 09, 2014
tarafından
Tim Graham
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
[1.7.x] Doc edits for refs #22487.
Backport of
c17cd151
from master
üst
0a515b02
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
21 additions
and
13 deletions
+21
-13
migration-operations.txt
docs/ref/migration-operations.txt
+1
-1
settings.txt
docs/ref/settings.txt
+9
-6
1.7.txt
docs/releases/1.7.txt
+3
-2
spelling_wordlist
docs/spelling_wordlist
+2
-0
advanced.txt
docs/topics/testing/advanced.txt
+5
-2
overview.txt
docs/topics/testing/overview.txt
+1
-2
No files found.
docs/ref/migration-operations.txt
Dosyayı görüntüle @
417da8a7
...
@@ -239,7 +239,7 @@ set ``atomic=False``.
...
@@ -239,7 +239,7 @@ set ``atomic=False``.
.. warning::
.. warning::
RunPython
does not magically alter the connection of the models for you;
``RunPython``
does not magically alter the connection of the models for you;
any model methods you call will go to the default database unless you
any model methods you call will go to the default database unless you
give them the current database alias (available from
give them the current database alias (available from
``schema_editor.connection.alias``, where ``schema_editor`` is the second
``schema_editor.connection.alias``, where ``schema_editor`` is the second
...
...
docs/ref/settings.txt
Dosyayı görüntüle @
417da8a7
...
@@ -2121,17 +2121,19 @@ The name of the class to use for starting the test suite. See
...
@@ -2121,17 +2121,19 @@ The name of the class to use for starting the test suite. See
TEST_NON_SERIALIZED_APPS
TEST_NON_SERIALIZED_APPS
------------------------
------------------------
.. versionadded:: 1.7
Default: ``[]``
Default: ``[]``
In order to restore the database state between tests for
TransactionTestCases
In order to restore the database state between tests for
and database backends without transactions, Django will :ref:`serialize the
``TransactionTestCase``\s and database backends without transactions, Django
contents of all apps with migrations <test-case-serialized-rollback>` when it
will :ref:`serialize the contents of all apps with migrations
starts the test run so it can then reload from that copy before tests that
<test-case-serialized-rollback>` when it starts the test run so it can then
need it.
reload from that copy before tests that
need it.
This slows down the startup time of the test runner; if you have apps that
This slows down the startup time of the test runner; if you have apps that
you know don't need this feature, you can add their full names in here (e.g.
you know don't need this feature, you can add their full names in here (e.g.
``
django.contrib.contenttypes
``) to exclude them from this serialization
``
'django.contrib.contenttypes'
``) to exclude them from this serialization
process.
process.
.. setting:: THOUSAND_SEPARATOR
.. setting:: THOUSAND_SEPARATOR
...
@@ -3120,6 +3122,7 @@ Templates
...
@@ -3120,6 +3122,7 @@ Templates
Testing
Testing
-------
-------
* Database: :setting:`TEST <DATABASE-TEST>`
* Database: :setting:`TEST <DATABASE-TEST>`
* :setting:`TEST_NON_SERIALIZED_APPS`
* :setting:`TEST_RUNNER`
* :setting:`TEST_RUNNER`
URLs
URLs
...
...
docs/releases/1.7.txt
Dosyayı görüntüle @
417da8a7
...
@@ -63,9 +63,10 @@ but a few of the key features are:
...
@@ -63,9 +63,10 @@ but a few of the key features are:
* ``initial_data`` fixtures are no longer loaded for apps with migrations; if
* ``initial_data`` fixtures are no longer loaded for apps with migrations; if
you want to load initial data for an app, we suggest you do it in a migration.
you want to load initial data for an app, we suggest you do it in a migration.
* Test rollback behavio
u
r is different for apps with migrations; in particular,
* Test rollback behavior is different for apps with migrations; in particular,
Django will no longer emulate rollbacks on non-transactional databases or
Django will no longer emulate rollbacks on non-transactional databases or
inside ``TransactionTestCase`` :ref:`unless specifically asked <test-case-serialized-rollback>`.
inside ``TransactionTestCase`` :ref:`unless specifically requested
<test-case-serialized-rollback>`.
App-loading refactor
App-loading refactor
~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~
...
...
docs/spelling_wordlist
Dosyayı görüntüle @
417da8a7
...
@@ -635,6 +635,8 @@ ubuntu
...
@@ -635,6 +635,8 @@ ubuntu
Ubuntuusers
Ubuntuusers
ul
ul
umask
umask
unassigning
unapplied
unapply
unapply
unapplying
unapplying
uncheck
uncheck
...
...
docs/topics/testing/advanced.txt
Dosyayı görüntüle @
417da8a7
...
@@ -504,12 +504,11 @@ can be useful during testing.
...
@@ -504,12 +504,11 @@ can be useful during testing.
* If autoclobber is ``True``, the database will be destroyed
* If autoclobber is ``True``, the database will be destroyed
without consulting the user.
without consulting the user.
``serialize`` determines if Django serializes the database into an
``serialize`` determines if Django serializes the database into an
in-memory JSON string before running tests (used to restore the database
in-memory JSON string before running tests (used to restore the database
state between tests if you don't have transactions). You can set this to
state between tests if you don't have transactions). You can set this to
False to significantly speed up creation time if you know you don't need
False to significantly speed up creation time if you know you don't need
data persist
a
nce outside of test fixtures.
data persist
e
nce outside of test fixtures.
Returns the name of the test database that it created.
Returns the name of the test database that it created.
...
@@ -517,6 +516,10 @@ can be useful during testing.
...
@@ -517,6 +516,10 @@ can be useful during testing.
:setting:`NAME` in :setting:`DATABASES` to match the name of the test
:setting:`NAME` in :setting:`DATABASES` to match the name of the test
database.
database.
.. versionchanged:: 1.7
The ``serialize`` argument was added.
.. function:: destroy_test_db(old_database_name, [verbosity=1])
.. function:: destroy_test_db(old_database_name, [verbosity=1])
Destroys the database whose name is the value of :setting:`NAME` in
Destroys the database whose name is the value of :setting:`NAME` in
...
...
docs/topics/testing/overview.txt
Dosyayı görüntüle @
417da8a7
...
@@ -251,7 +251,7 @@ tests and not in ``TransactionTestCase`` tests, and additionally only on
...
@@ -251,7 +251,7 @@ tests and not in ``TransactionTestCase`` tests, and additionally only on
backends where transactions are supported (the most important exception being
backends where transactions are supported (the most important exception being
MyISAM).
MyISAM).
Django can re
-
load that data for you on a per-testcase basis by
Django can reload that data for you on a per-testcase basis by
setting the ``serialized_rollback`` option to ``True`` in the body of the
setting the ``serialized_rollback`` option to ``True`` in the body of the
``TestCase`` or ``TransactionTestCase``, but note that this will slow down
``TestCase`` or ``TransactionTestCase``, but note that this will slow down
that test suite by approximately 3x.
that test suite by approximately 3x.
...
@@ -283,7 +283,6 @@ used. This behavior `may change`_ in the future.
...
@@ -283,7 +283,6 @@ used. This behavior `may change`_ in the future.
.. _may change: https://code.djangoproject.com/ticket/11505
.. _may change: https://code.djangoproject.com/ticket/11505
Understanding the test output
Understanding the test output
-----------------------------
-----------------------------
...
...
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