Arthur de Jong

Open Source / Free Software developer

summaryrefslogtreecommitdiffstats
path: root/tests/utils_tests
Commit message (Collapse)AuthorAgeFilesLines
* Fixed #25389 -- Fixed pickling a SimpleLazyObject ↵Ben Kraft2015-10-032-0/+96
| | | | | | | | wrapping a model. Pickling a `SimpleLazyObject` wrapping a model did not work correctly; in particular it did not add the `_django_version` attribute added in 42736ac8. Now it will handle this and other custom `__reduce__` methods correctly.
* Refs #23613 -- Removed django.utils.checksums per ↵Tim Graham2015-09-241-33/+0
| | | | deprecation timeline.
* Refs #23269 -- Removed the removetags template tag and ↵Tim Graham2015-09-241-31/+1
| | | | related functions per deprecation timeline.
* Fixed #24496 -- Added CSRF Referer checking against ↵Matt Robenolt2015-09-161-25/+19
| | | | | | | CSRF_COOKIE_DOMAIN. Thanks Seth Gottlieb for help with the documentation and Carl Meyer and Joshua Kehn for reviews.
* Fixed #23395 -- Limited line lengths to 119 characters.Dražen Odobašić2015-09-126-23/+62
|
* Fixed #24917 -- Made admindocs display model methods ↵Zan Anderle2015-09-071-0/+35
| | | | that take arguments.
* Made the autoreloader survive all exceptions.Aymeric Augustin2015-08-291-0/+16
| | | | Refs #24704.
* Ensured gen_filenames() yields native strings.Aymeric Augustin2015-08-291-0/+4
| | | | | This also fixes a test failure on Python 2 when Django is installed in a non-ASCII path. This problem cannot happen on Python 3.
* Refactored autoreload tests.Aymeric Augustin2015-08-291-43/+70
| | | | | | * Added helpers to test uncached and cached access. * Fixed test_project_root_locale: it duplicated test_locale_paths_setting. * Rewrote test_only_new_files: test more cases.
* Accounted for error files in the autoreloader.Aymeric Augustin2015-08-291-0/+40
| | | | | | | * When some old files contain errors, the second call to gen_filenames() should return them. * When some new files contain errors, the first call to gen_filenames(only_new=True) should return them.
* Fixed #21127 -- Started deprecation toward requiring ↵Flavio Curella2015-07-281-1/+1
| | | | on_delete for ForeignKey/OneToOneField
* Fixed #16501 -- Added an allow_unicode parameter to ↵Edward Henderson2015-07-171-4/+9
| | | | | | SlugField. Thanks Flavio Curella and Berker Peksag for the initial patch.
* Fixed #25093 -- Added ↵darkryder2015-07-101-0/+8
| | | | utils.datastructures.OrderedSet.__len__()
* Renamed RemovedInDjangoXYWarnings for new roadmap.Tim Graham2015-06-242-5/+5
| | | | | Forwardport of ae1d663b7913f6da233c55409c4973248372d302 from stable/1.8.x plus more.
* Fixed #25000 -- Fixed cast to string for lazy objects.Marten Kenbeek2015-06-231-0/+24
| | | | | | Implemented __str__() to return the string-representation of the proxied object, not the proxy itself, if the lazy object didn't have a string-like object in its resultclasses.
* Fixed #24978 -- Escaped special characters in loaddata ↵Moritz Sichert2015-06-141-0/+15
| | | | fixture paths
* Fixed #24965 -- Made LiveServerTestCase.live_server_url ↵Moritz Sichert2015-06-121-1/+39
| | | | accessible from class
* Fixed ImportError message in ↵Tomasz Kontusz2015-06-061-1/+3
| | | | utils.module_loading.import_string()
* Fixed #19210 -- Added leap year support to ↵Raphael Michel2015-06-051-0/+4
| | | | django.utils.timesince()
* Fixed #24728 -- Renamed mime_type to content_type for ↵Raphael Michel2015-06-041-2/+2
| | | | | | | syndication feeds Renamed the mime_type properties of RssFeed and Atom1Feed to content_type and start deprecation for the old names.
* Fixed #24897 -- Allowed using choices longer than 1 day ↵zauddelig2015-06-021-0/+14
| | | | with DurationField
* Fixed #24836 -- Made force_text() resolve lazy objects.Tim Graham2015-05-271-0/+5
|
* Refs #24652 -- Used SimpleTestCase where appropriate.Simon Charette2015-05-205-12/+12
|
* Factored skip condition when pytz isn't installed.Aymeric Augustin2015-05-171-4/+6
|
* Removed redundant list() calls.Tim Graham2015-05-161-3/+3
|
* Fixed #22598 -- Allowed make_aware() to work with ↵Josh Smeaton2015-04-241-0/+34
| | | | ambiguous datetime
* Fixed #24469 -- Refined escaping of Django's form ↵Moritz Sichert2015-03-281-4/+67
| | | | elements in non-Django templates.
* Made is_safe_url() reject URLs that start with control ↵Tim Graham2015-03-191-1/+3
| | | | | | characters. This is a security fix; disclosure to follow shortly.
* Fixed an infinite loop possibility in strip_tags().Tim Graham2015-03-191-0/+3
| | | | This is a security fix; disclosure to follow shortly.
* Fixed #24382 -- Allowed unicode chars inside formatted ↵Claude Paroz2015-03-091-0/+15
| | | | | | numbers Thanks Jacob Rief for the report and Tim Graham for the review.
* Fixed #23838 -- added missing `__iter__` to LazyObjectRik2015-03-081-5/+16
|
* Normalized usage of the tempfile module.Aymeric Augustin2015-02-231-9/+10
| | | | Specifically stopped using the dir argument.
* Refs #24324 -- Fixed Python 2 test failures when path to ↵Tim Graham2015-02-181-8/+9
| | | | Django source contains non-ASCII characters.
* Fixed #24321 -- Improved `utils.http.same_origin` ↵Lukas Klein2015-02-121-0/+6
| | | | compliance with RFC6454
* Fixed #24181 -- Fixed multi-char THOUSAND_SEPARATOR ↵Varun Sharma2015-02-081-0/+3
| | | | | | insertion Report and original patch by Kay Cha.
* Sorted imports with isort; refs #23860.Tim Graham2015-02-0620-40/+52
|
* Fixed #24242 -- Improved efficiency of ↵Matthew Somerville2015-02-041-0/+11
| | | | | | | | | | | utils.text.compress_sequence() The function no longer flushes zfile after each write as doing so can lead to the gzipped streamed content being larger than the original content; each flush adds a 5/6 byte type 0 block. Removing this means buf.read() may return nothing, so only yield if that has some data. Testing shows without the flush() the buffer is being flushed every 17k or so and compresses the same as if it had been done as a whole string.
* Fixed #24149 -- Normalized tuple settings to lists.darkryder2015-02-031-1/+1
|
* Cleaned up some forms tests.Loic Bistuer2015-01-271-8/+36
| | | | Thanks Berker Peksag and Tim Graham for the reviews. Refs #24219.
* Removed utils.module_loading.import_by_path() per ↵Tim Graham2015-01-181-38/+2
| | | | deprecation timeline; refs #21674.
* Removed utils.text.javascript_quote() per deprecation ↵Tim Graham2015-01-171-33/+1
| | | | timeline; refs #21725.
* Removed django.utils.tzinfo per deprecation timeline; ↵Tim Graham2015-01-171-92/+0
| | | | refs #17262.
* Removed django.utils.datastructures.SortedDict per ↵Tim Graham2015-01-171-129/+2
| | | | deprecation timeline.
* Removed django.utils.datastructures.MergeDict per ↵Tim Graham2015-01-171-72/+1
| | | | deprecation timeline; refs #18659.
* Fixed is_safe_url() to handle leading whitespace.Tim Graham2015-01-131-1/+2
| | | | This is a security fix. Disclosure following shortly.
* Accounted for multiple template engines in template ↵Aymeric Augustin2015-01-121-5/+5
| | | | responses.
* Applied ignore_warnings to Django testsClaude Paroz2014-12-306-38/+33
|
* Fixed #23831 -- Supported strings escaped by third-party ↵Aymeric Augustin2014-12-271-4/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | libs in Django. Refs #7261 -- Made strings escaped by Django usable in third-party libs. The changes in mark_safe and mark_for_escaping are straightforward. The more tricky part is to handle correctly objects that implement __html__. Historically escape() has escaped SafeData. Even if that doesn't seem a good behavior, changing it would create security concerns. Therefore support for __html__() was only added to conditional_escape() where this concern doesn't exist. Then using conditional_escape() instead of escape() in the Django template engine makes it understand data escaped by other libraries. Template filter |escape accounts for __html__() when it's available. |force_escape forces the use of Django's HTML escaping implementation. Here's why the change in render_value_in_context() is safe. Before Django 1.7 conditional_escape() was implemented as follows: if isinstance(text, SafeData): return text else: return escape(text) render_value_in_context() never called escape() on SafeData. Therefore replacing escape() with conditional_escape() doesn't change the autoescaping logic as it was originally intended. This change should be backported to Django 1.7 because it corrects a feature added in Django 1.7. Thanks mitsuhiko for the report.
* Fixed an inconsistency introduced in 547b1810.Aymeric Augustin2014-12-271-0/+18
| | | | | | | | mark_safe and mark_for_escaping should have been kept similar. On Python 2 this change has no effect. On Python 3 it fixes the use case shown in the regression test for mark_for_escaping, which used to raise a TypeError. The regression test for mark_safe is just for completeness.
* Fixed #23346 -- Fixed lazy() to lookup methods on the ↵Gavin Wahl2014-12-261-0/+14
| | | | | | real object, not resultclasses. Co-Authored-By: Rocky Meza <rmeza@fusionbox.com>