Chris Jerdonek
e7fb724cd2
Fixed #27032 -- Prevented setup_test_environment() from being called twice.
2016-08-08 10:40:29 -04:00
Dmitry Dygalo
d7a097265b
Fixed #26922 -- Fixed SimpleTestCase.assertHTMLEqual() crash on Python 3.5+.
2016-07-21 14:01:23 -04:00
Tim Graham
92053acbb9
Fixed E128 flake8 warnings in tests/.
2016-04-08 10:12:33 -04:00
Jon Dufresne
fcd08c1757
Fixed #11665 -- Made TestCase check deferrable constraints after each test.
2016-02-13 06:53:39 -05:00
Hasan
253adc2b8a
Refs #26022 -- Used context manager version of assertRaisesMessage in tests.
2016-01-29 13:03:39 -05:00
Hasan
3d0dcd7f5a
Refs #26022 -- Used context manager version of assertRaises in tests.
2016-01-29 12:32:18 -05:00
Simon Charette
7bb373e309
Refs #25746 -- Added a test utility to isolate inlined model registration.
...
Thanks to Tim for the review.
2016-01-06 20:00:07 -05:00
Marten Kenbeek
16411b8400
Fixed #26013 -- Moved django.core.urlresolvers to django.urls.
...
Thanks to Tim Graham for the review.
2015-12-31 14:21:29 -05:00
Mattia Larentis
2085d8d5bc
Fixed #25170 -- Made assertXMLEqual()/assertXMLNotEqual() ignore leading and trailing whitespace.
...
Thanks Jacek Bzdak for indepdently contributing a similar fix.
2015-11-09 15:53:30 -05:00
Dražen Odobašić
b1e33ceced
Fixed #23395 -- Limited line lengths to 119 characters.
2015-09-12 11:40:50 -04:00
Tommy Beadle
d3fdaf907d
Fixed #23727 -- Inhibited the post_migrate signal when using serialized_rollback.
...
When using a TransactionTestCase with serialized_rollback=True,
after creating the database and running its migrations (along with
emitting the post_migrate signal), the contents of the database
are serialized to _test_serialized_contents.
After the first test case, _fixture_teardown() would flush the
tables but then the post_migrate signal would be emitted and new
rows (with new PKs) would be created in the django_content_type
table. Then in any subsequent test cases in a suite,
_fixture_setup() attempts to deserialize the content of
_test_serialized_contents, but these rows are identical to the
rows already in the database except for their PKs. This causes an
IntegrityError due to the unique constraint in the
django_content_type table.
This change made it so that in the above scenario the post_migrate
signal is not emitted after flushing the tables, since it will be
repopulated during fixture_setup().
2015-08-24 08:59:20 -04:00
Caio Ariede
62d4074005
Fixed #25191 -- Added string diff to SimpleTestCase.assertXMLEqual() message.
2015-08-04 09:16:34 -04:00
Tim Graham
fd81588bc6
Refs #25176 -- Fixed typo in tests/test_utils/tests.py
2015-08-01 07:39:16 -04:00
Adam Chainz
0abb06930f
Fixed #25176 -- Prevented TestCase.setUpTestData() exception from leaking transaction.
2015-08-01 07:33:22 -04:00
Tim Graham
1c7c782d6e
Fixed #25188 -- Improved message raised by SimpleTestCase.assertRaisesMessage().
...
Thanks Chris Jerdonek for the suggestion and help with the patch.
2015-07-31 09:19:27 -04:00
Tim Graham
d27e0f04a6
Fixed #25190 -- Deprecated callable_obj parameter to assertRaisesMessage().
...
Thanks Aymeric Augustin for review.
2015-07-30 10:12:41 -04:00
Flavio Curella
c2e70f0265
Fixed #21127 -- Started deprecation toward requiring on_delete for ForeignKey/OneToOneField
2015-07-27 18:28:13 -04:00
Simon Charette
be67400b47
Refs #24652 -- Used SimpleTestCase where appropriate.
2015-05-20 13:46:13 -04:00
Simon Charette
c15b0c2792
Fixed #24652 -- Disallowed query execution in SimpleTestCase subclasses.
...
Thanks to Tim and Anssi for the review.
2015-05-20 12:50:41 -04:00
Tim Graham
e89c3a4603
Added backwards compatibility for assertRaisesMessage callable_obj param.
...
This was broken in c2bc1cefdc
(refs #23763 ).
2015-05-18 10:04:18 -04:00
Tim Graham
0ed7d15563
Sorted imports with isort; refs #23860 .
2015-02-06 08:16:28 -05:00
mlavin
2730dad0d7
Fixed #24197 -- Added clearing of staticfiles caches on settings changes during tests
...
Cleared caching in staticfiles_storage and get_finder when
relevant settings are changed.
2015-02-04 10:53:04 -05:00
Tim Graham
c5c235cd4f
Fixed typo in test_utils comment.
2014-12-24 07:10:34 -05:00
wrwrwr
e6f19ec322
Fixed #23933 -- Made override_settings(DATABASE_ROUTERS) affect the master router.
2014-12-01 11:30:50 -05:00
Davide Ceretti
2d06e3155a
Fixed #23300 -- Made assertTemplateUsed throw an error on responses not fetched using the test client.
...
Thanks zags for the report and bmispelon for the patch.
2014-11-03 14:31:23 -05:00
Berker Peksag
f7969b0920
Fixed #23620 -- Used more specific assertions in the Django test suite.
2014-11-03 11:56:37 -05:00
Aymeric Augustin
c0c1bb9e64
Avoided using private API get_template_from_string.
2014-10-31 11:38:53 +01:00
Duncan Parkes
88b6cf4ae4
Fixed #23600 -- Made default_storage aware of more settings changes.
...
Added MEDIA_URL, FILE_UPLOAD_PERMISSIONS, and
FILE_UPLOAD_DIRECTORY_PERMISSIONS to the list of settings.
2014-10-08 18:10:47 -04:00
Tim Graham
c7b5883c78
Fixed flake8 warnings.
2014-09-30 13:24:20 -04:00
Thomas Chaumeny
311b3ad9db
Fixed #23567 -- Made assertQuerysetEqual check Counter equality when ordered=False
2014-09-29 12:00:14 -04:00
Claude Paroz
5675eb371f
Allowed skipIf/UnlessDBFeature to accept several feature strings
2014-08-26 20:03:37 +02:00
Loic Bistuer
942556df2f
Fixed #22572 -- override_settings(ROOT_URLCONF) didn't clear urlresolvers._urlconfs.
...
Thanks Anubhav Joshi and Tim Graham for the reviews.
2014-05-05 19:29:27 +07:00
amatellanes
8394e570ba
Fixed #22465 -- New assertion assertJSONNotEqual
2014-04-18 15:11:08 +07:00
chriscauley
66ec9ee441
Fixed #22378 -- Updated \d to [0-9]+ in urlpatterns of docs and tests.
...
Thanks tomwys for the suggestion.
2014-04-16 20:36:29 -04:00
Anubhav Joshi
cd914e31c9
Fixed #21977 -- Deprecated SimpleTestCase.urls
2014-04-06 17:33:43 -04:00
Tim Graham
d73d0e071c
Fixed #22218 -- Deprecated django.conf.urls.patterns.
...
Thanks Carl Meyer for the suggestion and Alex Gaynor and Carl for reviews.
2014-04-03 07:28:10 -04:00
Tim Graham
bf5430a20b
Removed django.test.simple and django.test._doctest per deprecation timeline.
...
refs #17365 , #17366 , #18727 .
2014-03-21 13:36:46 -04:00
Chris Wilson
65131911db
Fixed #21518 -- Made override_settings(ROOT_URLCONF) clear the resolver cache.
...
Thanks Aymeric Augustin and Simon Charette for reviews.
2014-02-07 15:29:25 -05:00
Dominic Rodger
5cd6477fd6
Fixed #21462 -- Made `assertNumQueries` print executed queries on failure.
2013-12-11 15:24:17 -05:00
Loic Bistuer
a2814846ca
Fixed E124 pep8 warnings.
2013-12-10 15:12:48 -05:00
Alex Gaynor
ccd11c09c3
Flake8 fix -- correct number of newlines between top level definitions
2013-11-08 09:03:59 -08:00
Unai Zalakain
72f63bd24d
Fixed #17529 -- get_template_from_string default arguments break
...
``get_template_from_string`` default arguments were breaking
``assertTemplateUsed``. The solution has been to return only the names of the
templates with a ``name`` attribute distinct of ``None``. The default ``name``
kwarg of ``Template`` has been changed to ``None``, more pythonic than ``'<Unknown
Template>'``.
2013-11-08 17:10:37 +01:00
Jason Myers
c3791463a5
Fixing E302 Errors
...
Signed-off-by: Jason Myers <jason@jasonamyers.com>
2013-11-02 23:48:47 -05:00
Alex Gaynor
b35ff0d920
Fixed all the E203 violations
2013-10-26 18:27:42 -07:00
Alasdair Nicol
dfb4cb9970
Fixed #21285 -- Fixed E121,E122 pep8 warnings
2013-10-17 20:20:11 -04:00
Tim Graham
ff9e8eccf8
Removed unnecessary semicolons.
2013-10-10 08:50:32 -04:00
Aymeric Augustin
ee0ef1b094
Partial revert of 165f44aa
.
...
That commit didn't always improve readability.
See discussion on django-developers for details.
2013-09-22 14:04:10 +02:00
Aymeric Augustin
365c3e8b73
Replaced "not PY3" by "PY2", new in six 1.4.0.
2013-09-02 12:11:02 +02:00
Claude Paroz
165f44aaaa
Combine consecutive with statements
...
Python 2.7 allows to combine several 'with' instructions.
2013-08-16 20:12:10 +02:00
Claude Paroz
5c1143910e
Removed most of absolute_import imports
...
Should be unneeded with Python 2.7 and up.
Added some unicode_literals along the way.
2013-07-29 20:28:13 +02:00