1
0
mirror of https://github.com/django/django.git synced 2025-04-22 00:04:43 +00:00

193 Commits

Author SHA1 Message Date
Tim Graham
653d4558a5 [1.10.x] Removed some blank lines per isort.
Backport of ac06cb0e564b57b256ede98754586f36d2751b72 from master
2016-12-06 12:59:16 -05:00
Krzysztof Urbaniak
81b5971b1c [1.10.x] Fixed #27402 -- Fixed incorrect LocaleMiddleware redirects with prefix_default_language=False.
Backport of b8a815e9dfea89034ede7ff786551f89af84a31b from master
2016-11-29 13:42:37 -05:00
Ramiro Morales
a079d5ceed [1.10.x] Refs #26677 -- Simplified i18n test cleanups.
The fact that we aren't dealing with the Django source tree anymore
allows us to drop several tearDown()/addCleanup() calls that were
concerned with removing apiece files/dirs/symlinks created by test
cases, as we are covered by the removal of the parent temporary tree
anyways.

Thanks Tim Graham for advice and review.

Backport of bb7bb379e8cd91a91336946829519d64e919a1d2 from master
2016-11-23 07:18:59 -05:00
Ramiro Morales
c1bd4679e8 [1.10.x] Fixed #26677 -- Converted some i18n tests to use disposable FS tree.
This allows makemessages/compilemessages tests in `test_extraction.py`
and `test_compilation.py` to actually run isolated from each other
(unaffected by stray FS objects left by cleanup actions failures, debug
sessions, etc.) and to take advantage of the parallel tests execution
feature like most of the Django test suite.

`test_percents.py` gets slightly refactored to not inherit from the new
machinery which sets up every test case to copy and run under a
temporary tree.

Backport of faeeb84edfebecf5a5f40df9ef816e5f1cd457c6 from master
2016-11-23 07:18:40 -05:00
Krzysztof Urbaniak
a7dabe4216 [1.10.x] Fixed #27063 -- Prevented i18n_patterns() from using too much of the URL as the language.
Backport of a01d887a3ad9029ed198b6af974534fec46223f9 from master
2016-10-31 14:33:42 -04:00
Krzysztof Urbaniak
62c9894b34 [1.10.x] Added additional tests for translation's get_language_from_path().
Backport of ee06689878e87e45d3c2402dd5e3bb3ba2a79bcf from master
2016-10-31 14:33:29 -04:00
Alex Hill
4e8ccb3274
[1.10.x] Fixed #26945 -- Ensured that i18n_patterns returns a list
Backport of 971120778a7e7b7ebc2fc48275cca20a87580efe from master
2016-07-24 17:20:40 +02:00
Claude Paroz
de9af3912c [1.10.x] Refs #26897 -- Added cleanup to i18n test 2016-07-14 22:39:28 +02:00
Claude Paroz
208eead787 [1.10.x] Refs #26897 -- Missing directory containment in i18n test 2016-07-14 21:44:47 +02:00
Claude Paroz
96a37a0266 [1.10.x] Fixed #26897 -- Fixed makemessages crash on Python 2 with non-ASCII file names
Thanks Tim Graham for the review.
Backport of 3e71f6544feca490211e88db4f449dfdb7acce39 from master.
2016-07-14 20:39:00 +02:00
Tim Graham
567cfc1601 [1.10.x] Replaced use of TestCase.fail() with assertRaises().
Also removed try/except/fail antipattern that hides exceptions.

Backport of c9ae09addffb839403312131d4251e9d8b454508 from master
2016-07-01 09:58:56 -04:00
Jon Dufresne
13d60298ea [1.10.x] Fixed #26747 -- Used more specific assertions in the Django test suite.
Backport of 4f336f66523001b009ab038b10848508fd208b3b from master
2016-06-16 14:21:14 -04:00
Ramiro Morales
777bc8f7d6 [1.10.x] Fixed #26692 -- Relaxed an i18n compilemessages test.
The actual non-ASCII character differs on Windows.

Backport of 71421e8f8766525e709397f14e100f2846849df0 from master
2016-06-01 09:21:17 -04:00
Ramiro Morales
4095317afb [1.10.x] Fixed #26687 -- Made an i18n test not use a hardcoded path separator.
Fixed a failure on Windows.

Backport of e3877c53edb33271b0f31d20e60a924848692026 from master
2016-05-31 12:00:57 -04:00
Ramiro Morales
af8ac46015 [1.10.x] Fixed #26674 -- Corrected a i18n makemessages test.
Made it consistently read the PO file, decode its contents and then
check for the non-breaking space Unicode code point.

Previously we were erroneously skipping the interpretation of what we
read as UTF-8 text.

This was causing the test to fail on Windows with Python 3.5.

Backport of 1b00ed088073ffd268af15d25246d2565253536d from master
2016-05-29 12:49:47 -04:00
Ramiro Morales
e0a4d4477c [1.10.x] Fixed #26673 -- Fixed a I18N test case error on Windows+Python 2.7.
`subprocess.Popen` doesn't accept enviroment vars with Unicode var name
or value.

Backport of 15a5755e7cca630c2a0dbbcba436621ccc437c21 from master
2016-05-28 17:16:03 -04:00
Florian Apolloner
9baf692a58 Fixed #26601 -- Improved middleware per DEP 0005.
Thanks Tim Graham for polishing the patch, updating the tests, and
writing documentation. Thanks Carl Meyer for shepherding the DEP.
2016-05-17 07:22:22 -04:00
Claude Paroz
4731e9d82e Fixed #26341 (again) -- Addressed multiple occurrences per line use case 2016-05-02 19:39:56 +02:00
Claude Paroz
b16b124996 Fixed #26341 -- Fixed makemessages breaking location comments for HTML files
Thanks Sylvain Garancher for the report and Veranika Sabiashchanskaya for the
initial patch.
2016-04-30 12:08:20 +02:00
Claude Paroz
185f90c45f Adapted _assertPoLocComment for multi-file source lines in po files
Refs #17375.
2016-04-30 12:07:40 +02:00
Jon Dufresne
ec6121693f Fixed #22383 -- Added support for HTML5 required attribute on required form fields. 2016-04-21 19:16:38 -04:00
Tim Graham
92053acbb9 Fixed E128 flake8 warnings in tests/. 2016-04-08 10:12:33 -04:00
Krzysztof Urbaniak
85a4844f8a Refs #25933 -- Fixed i18n_patterns() prefix_default_language=False with HTTP_ACCEPT_LANGUAGE header. 2016-03-10 10:51:55 -05:00
Krzysztof Urbaniak
839a955d08 Fixed #25933 -- Allowed an unprefixed default language in i18n_patterns(). 2016-03-08 08:14:10 -05:00
Claude Paroz
95ca01f999 Fixed #26271 -- Fixed i18n_patterns resolution when no language is active
Thanks Marten Kenbeek for the report.
2016-03-07 11:48:11 +01:00
Simon Charette
d0451e4cad Fixed #26295 -- Allowed using i18n_patterns() in any root URLconf.
Thanks Tim for the review.
2016-03-03 12:08:49 -05:00
Claude Paroz
eda306f1ce Fixed #26232 -- Fixed Popen mocking environment in i18n tests
Refs #25925. Thanks Jeroen Pulles for the report.
2016-02-23 20:06:18 +01:00
Alexey Kotlyarov
b59f963ad2 Fixed #26212 -- Made forms.FileField and translation.lazy_number() picklable. 2016-02-15 11:44:29 -05:00
Marcin Markiewicz
f7a9872b91 Fixed #26173 -- Prevented localize_input() from formatting booleans as numbers. 2016-02-09 13:07:33 -05:00
Hasan
26ad01719d Refs #26022 -- Replaced six.assertRaisesRegex with assertRaisesMessage as appropriate. 2016-01-29 13:37:33 -05:00
Hasan
3d0dcd7f5a Refs #26022 -- Used context manager version of assertRaises in tests. 2016-01-29 12:32:18 -05:00
Claude Paroz
104eddbdf6 Fixed #26093 -- Allowed escape sequences extraction by gettext on Python 3
Thanks Sylvain Fankhauser for the report and Tim Graham for the review.
2016-01-23 14:00:55 +01:00
pp
b34ff66e5b Added missing period to "etc.". 2016-01-11 18:05:15 -05:00
Claude Paroz
632a9f21bc Fixed #26046 -- Fixed a crash with translations and Django-unknown language code
Thanks Jens Lundstrom for the report and Tim Graham for the review.
2016-01-06 20:30:56 +01: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
Claude Paroz
cd3c042b04 Fixed #25915 -- Allowed language not in Django's default LANGUAGES
This fixes a regression introduced by a5f6cbce07.
Thanks Gavin Wahl for the report and Tim Graham for the review.
2015-12-18 17:50:16 +01:00
Sergey Fedoseev
5005b527cb Fixed #25925 -- Forced LANG=C for test_msgfmt_error_including_non_ascii. 2015-12-13 16:33:31 +01:00
Tim Graham
93be2f7dea Refs #25677 -- Skipped an i18n test on older gettext versions. 2015-12-04 17:53:15 -05:00
Josh Soref
93452a70e8 Fixed many spelling mistakes in code, comments, and docs. 2015-12-03 12:48:24 -05:00
Gagaro
34d88944f4 Fixed #25812 -- Restored the ability to use custom formats with the date template filter. 2015-11-28 08:38:45 -05:00
Florian Apolloner
316bc3fc94 Fixed a settings leak possibility in the date template filter.
This is a security fix.
2015-11-24 11:20:29 -05:00
Tim Graham
db8763fb23 Refs #25677 -- Fixed Python 2 i18n test failure on non-ASCII path. 2015-11-19 15:55:00 -05:00
Claude Paroz
fa08d27fb7 Fixed #25677 -- Prevented decoding errors in/after Popen calls
Thanks Gavin Wahl for the report and Tim Graham for the review.
2015-11-19 15:17:47 +01:00
Marti Raudsepp
d3e3703a15 Fixed #25720 -- Made gettext() return bytestring on Python 2 if input is bytestring.
This is consistent with the behavior of Django 1.7.x and earlier.
2015-11-11 08:56:10 -05:00
Ville Skyttä
3ee18400ae Fixed #25668 -- Misc spelling errors 2015-11-03 11:58:13 +02:00
Tim Graham
37ea3cb03e Fixed "URLconf" spelling in code comments. 2015-10-22 14:46:42 -04:00
Claude Paroz
8b5acda821 Fixed #25571 -- Fixed boolean evaluation of ungettext_lazy 2015-10-22 15:17:45 +02:00
Tim Graham
a25d3ce007 Refs #22218 -- Removed conf.urls.patterns() per deprecation timeline. 2015-09-23 19:31:09 -04:00
Dražen Odobašić
b1e33ceced Fixed #23395 -- Limited line lengths to 119 characters. 2015-09-12 11:40:50 -04:00
Aymeric Augustin
b799a50c8e Serialized some tests that interact with the filesystem.
Considering the APIs exercised by these test cases, it's hard to make
them independent.
2015-09-09 23:01:17 +02:00