Claude Paroz
7b2f2e74ad
Refs #23919 -- Removed six.<various>_types usage
...
Thanks Tim Graham and Simon Charette for the reviews.
2017-01-18 20:18:46 +01:00
Claude Paroz
f3c43ad1fd
Refs #23919 -- Removed python_2_unicode_compatible decorator usage
2017-01-18 13:44:34 +01:00
Claude Paroz
d7b9aaa366
Refs #23919 -- Removed encoding preambles and future imports
2017-01-18 09:55:19 +01:00
Tim Graham
7510b872e7
Refs #25190 -- Removed callable_obj parameter to assertRaisesMessages().
...
Per deprecation timeline.
2017-01-17 20:52:01 -05:00
François Freitag
f3b7c05936
Refs #16614 -- Made QuerySet.iterator() use server-side cursors on PostgreSQL.
...
Thanks to Josh Smeaton for the idea of implementing server-side cursors
in PostgreSQL from the iterator method, and Anssi Kääriäinen and Kevin
Turner for their previous work. Also Simon Charette and Tim Graham for
review.
2017-01-11 09:25:37 -05:00
Tim Graham
b5f0b3478d
Fixed #27579 -- Added aliases for Python 3's assertion names in SimpleTestCase.
2016-12-07 17:42:31 -05:00
za
321e94fa41
Refs #27392 -- Removed "Tests that", "Ensures that", etc. from test docstrings.
2016-11-10 21:30:21 -05:00
Simon Charette
18c72d59e0
Fixed #27214 -- Made skip db features decorators respect wrapping order and inheritance.
2016-09-13 14:12:20 -04:00
Adam Zapletal
ca2ccf54ff
Fixed #24112 -- Fixed assertInHTML()'s counting if needle has no root element.
2016-08-31 20:41:34 -04:00
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