Tim Graham
ac5f2a4ef7
Fixed refs #23987 test on Oracle.
2014-12-15 18:15:55 -05:00
Markus Holtermann
3ef50a772b
Fixed reverse test execution for migration manager tests
...
Thanks to Tim Graham for reporting the issue; refs #23822
2014-12-15 17:54:40 -05:00
Andriy Sokolovskiy
d8f3b86a76
Fixed #23405 -- Fixed makemigrations prompt when adding Text/CharField.
...
A default is no longer required.
2014-12-15 14:41:52 -05:00
Andriy Sokolovskiy
089047331d
Fixed #23987 -- Made SQLite SchemaEditor always use effective_default().
2014-12-15 13:40:24 -05:00
Diego Guimarães
222699d224
Refs #23947 -- Fixed queries test execution order dependency.
...
Specify an id to avoid conflict with objects created in setUpTestData.
2014-12-15 12:25:55 -05:00
Tim Graham
e8223b889a
Corrected test assertion from refs #21403 .
2014-12-15 12:04:07 -05:00
Diego Guimarães
d8182f294a
Refs #23947 -- Fixed admin_views test execution order dependency.
2014-12-15 10:48:42 -05:00
Markus Holtermann
aa5ef0d4fc
Fixed #23822 -- Added support for serializing model managers in migration
...
Thanks to Shai Berger, Loïc Bistuer, Simon Charette, Andrew Godwin,
Tim Graham, Carl Meyer, and others for their review and input.
2014-12-15 08:34:15 -05:00
Aymeric Augustin
71a559e771
Removed obsolete code for running test_loaders.py.
...
Running this file as a standalone script doesn't work anyway.
2014-12-13 22:51:57 +01:00
Michael Hall
895dc880eb
Fixed #23812 -- Changed django.utils.six.moves.xrange imports to range
2014-12-13 12:45:58 -05:00
Tim Graham
df9f2e41fa
Refs #23943 -- Removed an invalid generic_views test.
...
Using PUT as a method for the form element is no longer supported
as described in the ticket.
2014-12-12 16:14:10 -05:00
Carl Meyer
c72eb80d11
Fixed #23455 -- Accept either bytes or text for related_name, convert to text.
2014-12-12 12:50:39 -07:00
Carl Meyer
8aaf51f94c
Revert "Fixed #23455 -- Forced related_name to be a unicode string during deconstruction."
...
This reverts commit 45bd7b3bd9
.
2014-12-12 12:50:39 -07:00
Tim Graham
c7a19f4203
Fixed #23857 -- Fixed admin crash with "save as new" and deleting inline.
...
Thanks amarandon for the report.
2014-12-12 10:24:39 -05:00
Josh Smeaton
267a1dcd9b
Fixed #23941 -- Removed implicit decimal formatting from expressions.
2014-12-12 10:17:48 -05:00
Kevin Marsh
e2868308bf
Fixed template tag braces spacing.
2014-12-12 09:34:18 -05:00
Grzegorz Slusarek
0dea81cd6d
Fixed #23674 -- Fixed a crash when a MultiValueField has invalid data.
2014-12-12 08:47:21 -05:00
Shabda Raaj
43041ee48c
Refs #18586 -- Refactored expressions tests.
2014-12-11 18:24:23 -05:00
Tim Graham
079ee1ff5d
Readded test inadvertently removed in last commit.
2014-12-11 18:01:34 -05:00
Shabda Raaj
6db122c7ab
Refs #18586 -- Split custom manager tests.
2014-12-11 17:47:36 -05:00
Shabda Raaj
f66d9a2300
Refs #18586 -- Split custom_pk test.
2014-12-11 17:13:24 -05:00
Thomas Chaumeny
3bb78c5e7a
Cleanup cache in contrib.sites to prevent test interference -- refs #11505
2014-12-11 15:56:54 -05:00
Sergey Parkhomenko
059c9ab24c
Fixed #23977 -- Added setdefault() method to HttpResponse
2014-12-11 13:56:56 -05:00
Markus Holtermann
44927ba817
Fixed #23956 -- Fixed migration creation for multiple table inheritance
2014-12-11 13:28:21 -05:00
Diego Guimarães
fd60e6c887
Refs #23947 -- Prevented staticfiles tests from having side effects.
2014-12-09 11:17:05 -05:00
Jon Dufresne
4468c08d70
Fixed #23968 -- Replaced list comprehension with generators and dict comprehension
2014-12-08 07:58:23 -05:00
Diego Guimarães
9f427617e4
Refs #23947 -- Worked around a bug in Python that prevents deprecation warnings from appearing in tests.
2014-12-06 14:46:01 -05:00
Aymeric Augustin
1917017b8d
Moved misplaced comment.
2014-12-06 20:40:55 +01:00
Tim Graham
40c60efecc
Refs #23947 -- Isolated some cache tests.
...
Thanks Diego Guimarãesi and Florian Apolloner.
2014-12-06 13:59:49 -05:00
Diego Guimarães
106dde91e4
Refs #23947 -- Fixed introspection test that had a side effect.
2014-12-06 13:00:25 -05:00
Diego Guimarães
e32a8a99d9
Refs #23947 -- Isolated a mail test.
2014-12-06 12:06:06 -05:00
Tim Graham
3bb52c5019
Refs #23890 -- Restored silencing of numpy DeprecationWarnings in template tests.
2014-12-06 11:27:15 -05:00
Preston Timmons
5c68870169
Fixed #23958 -- Rewrote filter tests as unit tests.
2014-12-06 10:57:46 -05:00
Diego Guimarães
d05709821c
Refs #23947 -- Made a modeladmin test cleanup after itself.
2014-12-05 16:19:59 -05:00
Tim Graham
b6ea059b4a
Fixed #23957 -- Started deprecation toward requiring session verification.
...
Thanks Carl Meyer for review.
2014-12-05 07:37:34 -05:00
Claude Paroz
8d7a48027e
Fixed #23954 -- Added special text/varchar PostgreSQL indexes in migrations
...
Thanks adityagupta104 for the report and Tim Graham for the review.
2014-12-04 21:27:42 +01:00
Thomas Chaumeny
ce2eff7e48
Converted a SimpleTestCase that creates data to TestCase.
2014-12-04 13:24:41 -05:00
Helen ST
7daf00679d
Refs #18586 -- Split up order_with_respect_to tests
2014-12-04 11:05:26 -05:00
Tim Graham
765fa36d57
Fixed #23920 -- Fixed MySQL crash when adding blank=True to TextField.
...
Thanks wkornewald for the report and Markus Holtermann for review.
2014-12-04 10:57:10 -05:00
Thomas Tanner
018d110ef5
Fixed #23911 -- Added support for buffer file uploads in the test client
2014-12-04 07:42:03 -05:00
Ramiro Morales
16f26defa7
Converted recently refactored templates tests to SimpleTestCase.
...
These test methods don't need DB setup/teardown.
Refs #23768 and b872134b
.
2014-12-03 18:56:46 -05:00
Alexander Shchapov
2cd19f3738
Refs #18586 -- Split up model_inheritance.ModelInheritanceTest
2014-12-03 18:54:47 -05:00
Berker Peksag
560b4207b1
Removed redundant numbered parameters from str.format().
...
Since Python 2.7 and 3.1, "{0} {1}" is equivalent to "{} {}".
2014-12-03 14:27:38 -05:00
Tim Graham
50c1d8f24b
Added a test to verify headers set by default middleware; refs #23939 .
2014-12-03 13:47:23 -05:00
Thomas Chaumeny
26dd518b5c
Refactored some tests to take advantage of refs #20392 .
2014-12-03 10:37:12 -05:00
Thomas Chaumeny
da9fe5c717
Fixed #20392 -- Added TestCase.setUpTestData()
...
Each TestCase is also now wrapped in a class-wide transaction.
2014-12-03 10:37:04 -05:00
Gavin Wahl
dee4d23f7e
Fixed #23950 -- Prevented calling deconstruct on classes in MigrationWriter.
2014-12-03 08:22:29 -05:00
Eric Rouleau
9d1a69579b
Fixed #23935 -- Converted decimals to fixed point in utils.numberformat.format
2014-12-03 07:49:06 -05:00
Berker Peksag
adacbd64a0
Fixed "no such test method" error in template_tests.
...
Without this patch, you couldn't run an individual test
case in template_tests.
Refs #23768
2014-12-03 13:04:23 +01:00
Preston Timmons
b872134bfc
Fixed #23768 -- Rewrote template tests as unit tests.
2014-12-02 19:18:35 -05:00
Shai Berger
4a4ad27712
Marked some tests as expected failures on Oracle/cx_Oracle<=5.1.3/Python3
...
Refs #23843 which is really a cx_Oracle bug
2014-12-03 00:53:27 +02:00
Kamil Braun
0623f4dea4
Fixed #23934 -- Fixed regression in admin views obj parameter.
2014-12-02 08:42:17 -05:00
Preston Timmons
1da1fe8e16
Ensured foreign_object tests reset language properly.
2014-12-02 07:31:52 -05:00
Andriy Sokolovskiy
1739ae9edc
Fixed #23807 -- Ignored non-digits in psycopg2 version
2014-12-01 18:42:08 -05:00
Tim Graham
b8cc5f3cd4
Fixed selenium test failure of JavascriptI18nTests.
...
The failure was introduced in dd1ea70779
.
The tests wouldn't start due to a "Dependency on unknown app" error.
2014-12-01 16:42:48 -05:00
Tim Graham
82e4f956e3
Fixed #23289 -- Added mock as a test dependency.
2014-12-01 16:08:25 -05:00
Tim Graham
43fcf3505e
Fixed admin_views test from refs #7361 (name was too long).
2014-12-01 15:47:41 -05:00
Claude Paroz
e11c6fd218
Fixed #23909 -- Prevented crash when collecting SQL for RunSQL
...
Thanks James Rivett-Carnac for the report and Markus Holtermann
for the review.
2014-12-01 20:26:40 +01:00
Alexander Shchapov
e1513a7960
Fixed #18586 -- Split up model_package.ModelPackageTests.
2014-12-01 12:49:45 -05:00
wrwrwr
b481c85697
Corrected a docstring in tests/migrations/test_operations.py.
2014-12-01 11:37:51 -05:00
wrwrwr
3a8799c8a4
Removed an incorrect docstring in tests/multiple_database/tests.py.
2014-12-01 11:37:08 -05:00
wrwrwr
fce2890e92
Removed a no-op statement in tests/multiple_database/tests.py.
2014-12-01 11:36:54 -05:00
wrwrwr
9136ceb6fb
Replaced router.routers usage with override_settings(DATABASE_ROUTERS); refs #23933 .
2014-12-01 11:34:15 -05:00
wrwrwr
e6f19ec322
Fixed #23933 -- Made override_settings(DATABASE_ROUTERS) affect the master router.
2014-12-01 11:30:50 -05:00
Markus Holtermann
d2202ec2d4
Fixed #23880 -- Added missing index_together handling for SQLite
2014-12-01 11:30:33 +07:00
wrwrwr
6dbe979b4d
Fixed #23930 -- Added copies of captured_std* managers from CPython's test.support.
...
StringIO import was adapted for compatibility with Python 2.
2014-11-29 11:21:58 -05:00
Berker Peksag
c8dcded930
Fixed #17890 -- Added an extra_context parameter to AdminSite.password_change().
2014-11-29 10:31:09 -05:00
Tim Graham
3131e9cef5
Fixed #23923 -- Promoted Django's deprecation warnings to errors in runtests.py
2014-11-29 10:27:04 -05:00
Tim Graham
8402909876
Silenced all admin validation warnings.
...
Warnings could escape depending on the order in which tests were run.
2014-11-28 19:00:08 -05:00
Thomas Chaumeny
17fe0bd808
Fixed #23423 -- Added unaccent lookup in django.contrib.postgres
2014-11-28 18:22:20 -05:00
Berker Peksag
47789410db
Corrected deprecation warnings for RedirectView; refs #21587 .
2014-11-28 17:59:55 -05:00
Tim Heap
deb607648e
Fixed #23728 -- Added the --exit option to makemigrations.
...
If no changes that need migrations are found, `makemigrations --exit`
exits with error code 1.
2014-11-28 07:48:39 -05:00
Anssi Kääriäinen
ab89414f40
Fixed #23853 -- Added Join class to replace JoinInfo
...
Also removed Query.join_map. This structure was used to speed up join
reuse calculation. Initial benchmarking shows that this isn't actually
needed. If there are use cases where the removal has real-world
performance implications, it should be relatively straightforward to
reintroduce it as map {alias: [Join-like objects]}.
2014-11-28 07:30:26 -05:00
Anssi Kääriäinen
c7175fcdfe
Fixed #901 -- Added Model.refresh_from_db() method
...
Thanks to github aliases dbrgn, carljm, slurms, dfunckt, and timgraham
for reviews.
2014-11-28 06:54:00 -05:00
Markus Holtermann
912ad03226
Fixed #23894 -- Made deconstruct methods favor kwargs over args
2014-11-28 06:05:56 -05:00
Martin Blech
e023ceb453
Fixed #23910 -- Added reply_to parameter to EmailMessage
...
Thanks to Berker Peksag and Tim Graham for the review and suggestions.
2014-11-28 06:00:06 -05:00
Thomas Chaumeny
6b5d82749c
Fixed #16731 -- Made pattern lookups work properly with F() expressions
2014-11-28 12:50:42 +02:00
Diego Guimarães
f39b0421b4
Fixed #23338 -- Added warning when unique=True on ForeigKey
...
Thanks Jonathan Lindén for the initial patch, and Tim Graham
and Gabe Jackson for the suggestions.
2014-11-27 19:42:30 -05:00
Martin Blech
abf87333a1
Fixed #23924 -- Made EmailMessage raise TypeError for type checks
2014-11-27 18:43:45 -05:00
wrwrwr
7cd3f1c295
Fixed cache state dependence for assertNumQueries in test_group_permission_performance.
...
Refs #20432 and #23746 .
2014-11-27 13:02:21 -05:00
Berker Peksag
093e6c68b9
Fixed #14664 -- Logged a warning if MiddlewareNotUsed is raised in DEBUG mode.
2014-11-27 07:55:07 -05:00
Anssi Kääriäinen
bd337184f1
Fixed #23877 -- aggregation's subquery missed target col
...
Aggregation over subquery produced syntactically incorrect queries in
some cases as Django didn't ensure that source expressions of the
aggregation were present in the subquery.
2014-11-27 06:50:08 -05:00
MattBlack85
e9d1f1182a
Fixed #23801 -- Added warning when max_length is used with IntegerField
2014-11-26 18:41:54 -05:00
Anssi Kääriäinen
cbb5cdd155
Fixed #23867 -- removed DateQuerySet hacks
...
The .dates() queries were implemented by using custom Query, QuerySet,
and Compiler classes. Instead implement them by using expressions and
database converters APIs.
2014-11-26 17:49:25 -05:00
Baptiste Mispelon
c335c0fee9
Fixed #23914 -- Improved {% now %} to allow storing its result in the context.
...
Thanks to Tim for the review.
2014-11-25 22:11:35 +01:00
Simon Charette
3a9aa155e2
Fixed #23915 -- Made sure m2m fields through non-pk to_field are allowed in the admin.
...
refs #23754 , #23862
2014-11-25 15:28:21 -05:00
Simon Charette
f9c4e14aec
Fixed #23754 -- Always allowed reference to the primary key in the admin
...
This change allows dynamically created inlines "Add related" button to work
correcly as long as their associated foreign key is pointing to the primary
key of the related model.
Thanks to amorce for the report, Julien Phalip for the initial patch,
and Collin Anderson for the review.
2014-11-25 13:26:50 -05:00
Redouane Zait
8e7b384d89
Fixed #23898 -- Added missing context to admin's deleted_selected view.
...
Thanks Redouane Zait for the report.
2014-11-25 11:22:15 -05:00
Tim Graham
392e11945f
Fixed flake8 warnings.
2014-11-25 11:20:40 -05:00
Luke Plant
ff3d746e8d
Fixed bug in circular dependency algo for migration dependencies.
...
Previous algo only worked if the first item was a part of the loop,
and you would get an infinite loop otherwise (see test).
To fix this, it was much easier to do a pre-pass.
A bonus is that you now get an error message that actually helps you debug
the dependency problem.
2014-11-25 15:37:34 +00:00
wrwrwr
056a3c6c37
Fixed #23682 -- Enhanced circular redirects detection in tests.
...
When the test client detects a redirect to a URL seen in the
currently followed chain it will now raise a RedirectCycleError
instead of just returning the first repeated response.
It will also complain when a single chain of redirects is longer
than 20, as this often means a redirect loop with varying URLs,
and even if it's not actually one, such long chains are likely
to be treated as loops by browsers.
Thanks Preston Timmons, Berker Peksag, and Tim Graham for reviews.
2014-11-25 10:12:28 -05:00
Adam Alton
a973fb2d68
Fixed and restored assertions in OneToOneTests.test_foreign_key.
...
These assertions had been removed in 34ba86706f
and 7fe554b2a3
,
seemingly because they were referencing the wrong objects, and so
they started failing when the checking of object types (as well as
PK values) was introduced.
2014-11-25 09:47:32 -05:00
Berker Peksag
9a30acad8a
Fixed #21587 -- Added a warning for changing default of RedirectView.permanent.
2014-11-25 09:22:18 -05:00
Tim Graham
d43dd03ca3
Fixed #23890 -- Silenced numpy DeprecationWarnings in template tests.
2014-11-25 09:09:13 -05:00
wrwrwr
e22c64dfc0
Fixed #23742 -- Added an option to reverse tests order.
...
This is useful for debugging side effects affecting tests that
are usually executed before a given test. Full suite and pair
tests sort cases more or less deterministically, thus some test
cross-dependencies are easier to reveal by reversing the order.
Thanks Preston Timmons for the review.
2014-11-24 19:24:11 -05:00
wrwrwr
31f85bae1e
Changed test_runner imports to name objects imported from test.runner.
2014-11-24 17:31:39 -05:00
Sergey Fedoseev
1e9ac504e4
Fixed #23888 -- Fixed crash in File.__repr__() when name contains unicode.
2014-11-24 15:54:57 -05:00
Aymeric Augustin
47a131b944
Encapsulated TEMPLATE_STRING_IF_INVALID in Engine.
2014-11-23 11:53:53 +01:00
Aymeric Augustin
29a977ab14
Moved template loaders management in Engine.
...
Passed the engine instance to loaders. This is a prerequisite for
looking up configuration on the engine instance instead of global
settings.
This is backwards incompatible for custom template loaders that override
__init__. However the documentation doesn't talk about __init__ and the
way to pass arguments to custom template loaders isn't specified. I'm
considering it a private API.
2014-11-23 11:52:12 +01:00
Aymeric Augustin
17012b6936
Deprecated dirs argument to override TEMPLATE_DIRS.
...
Cancels 2f0566fa
. Refs #4278 .
2014-11-23 09:29:33 +01:00