Commit Graph

160 Commits

Author SHA1 Message Date
Simon Charette 8c775391b7 Refs #28478 -- Deprecated TestCase's allow_database_queries and multi_db in favor of databases. 2019-01-10 19:11:21 -05:00
Simon Charette 0f212db29d Made reused RequestFactory instances class attributes. 2018-11-27 09:49:02 -05:00
Tim Graham 193c109327 Switched TestCase to SimpleTestCase where possible in Django's tests. 2018-11-27 08:58:44 -05:00
oliver abd0ad7681 Fixed #29626, #29584 -- Added optimized versions of get_many() and delete_many() for the db cache backend. 2018-08-17 15:13:09 -04:00
oliver 3ca24fd1c0 Optimized some cache tests with set_many(). 2018-08-16 09:02:21 -04:00
Christian Barcenas c9c6c16650 Fixed #20584 -- Fixed memcached's get_many() with single-use iterators.
Thanks Guyon Morée for the report.
2018-07-09 10:24:41 -04:00
Morgan Aubert 704443acac Fixed #29363 -- Added SimpleTestCase.assertWarnsMessage(). 2018-05-09 11:40:28 -04:00
Nicolas Noé 3246ad1065 Fixed #27480 -- Added cache.touch(). 2018-04-27 17:48:35 -04:00
Sergey Fedoseev 4ff29a53e6 Refs #17476 -- Removed obsolete simplification of timezone names in cache key generation. 2018-03-03 14:56:39 -05:00
shanghui d968788b57 Fixed #28833 -- Prevented CacheMiddleware from caching responses with "Cache-Control: private". 2018-02-06 09:42:05 -05:00
Grant Jenks d38a3169a4 Fixed #28977 -- Changed local-memory cache to use LRU culling.
LRU culling turns every read into a kind of write to the cache: cache keys
are moved to the first position in the OrderedDict when they are retrieved.
The RWLock which permitted multiple readers while prioritizing a single
writer is obsolete since all accesses are now writes.
2018-01-24 12:26:19 -05:00
Adam Johnson acc989f037 Fixed #28760 -- Removed DummyCache's unnecessary get/set/delete_many(). 2017-10-31 12:16:09 -04:00
Adam Johnson abacd09f07 Refs #27318 -- Made DummyCache.set_many() return a list for consistency with other backends. 2017-10-30 12:13:17 -04:00
Daniel Tao 4d60261b2a Fixed #28601 -- Prevented cache.get_or_set() from caching None if default is a callable that returns None. 2017-10-10 09:20:34 -04:00
Tim Graham 48d57788ee Refs #26447 -- Removed the USE_ETAGS setting per deprecation timeline. 2017-09-22 12:51:18 -04:00
Tim Graham e47b56d791 Refs #20892 -- Removed support for passing pylibmc behavior settings as top-level attributes of CACHES['OPTIONS'].
Per deprecation timeline.
2017-09-22 12:51:17 -04:00
Olivier Tabone a027447f56 Fixed #27318 -- Made cache.set_many() return the list of failed keys. 2017-09-06 14:38:44 -04:00
caleb logan 68f0e8d8b1 Fixed #28500 -- Fixed crash in FileBasedCache._is_expired() if the cache file is empty. 2017-09-03 20:11:49 -04:00
Chandrakant Kumar f6800a081a Refs #27787 -- Corrected or removed invalid call_command() options. 2017-06-16 11:06:01 -04:00
Jon Dufresne 21046e7773 Fixed #28249 -- Removed unnecessary dict.keys() calls.
iter(dict) is equivalent to iter(dict.keys()).
2017-05-27 19:08:46 -04:00
Bruno Alla 6092ea8fa6 Refs #27804 -- Used subTest() in several tests. 2017-05-24 08:36:34 -04:00
Tim Graham 6b4f018b2b Replaced type-specific assertions with assertEqual().
Python docs say, "it's usually not necessary to invoke these methods directly."
2017-03-17 07:51:48 -04:00
Tim Graham 500532c95d Refs #23919 -- Removed default 'utf-8' argument for str.encode()/decode(). 2017-02-09 09:03:47 -05:00
Tim Graham 29f607927f Fixed spelling of "nonexistent". 2017-02-03 08:01:45 -05:00
Tim Graham 1c466994d9 Refs #23919 -- Removed misc Python 2/3 references. 2017-01-25 13:59:25 -05:00
chillaranand d6eaf7c018 Refs #23919 -- Replaced super(ClassName, self) with super(). 2017-01-25 12:23:46 -05:00
Tim Graham 632c4ffd9c Refs #23919 -- Replaced errno checking with PEP 3151 exceptions. 2017-01-25 10:13:08 -05:00
Claude Paroz 2366100872 Removed unneeded force_text calls in the test suite 2017-01-24 18:45:54 +01:00
Tim Graham d170c63351 Refs #23919 -- Removed misc references to Python 2. 2017-01-21 20:02:00 -05:00
Tim Graham 7aba69145d Refs #23919 -- Removed django.test.mock Python 2 compatibility shim. 2017-01-20 08:17:20 -05:00
Simon Charette cecc079168 Refs #23919 -- Stopped inheriting from object to define new style classes. 2017-01-19 08:39:46 +01:00
Aymeric Augustin a556396339 Refs #23919 -- Replaced io.open() with open().
io.open() is an alias for open() on Python 3.
2017-01-18 21:45:12 -05:00
Claude Paroz 2b281cc35e Refs #23919 -- Removed most of remaining six usage
Thanks Tim Graham for the review.
2017-01-18 21:33:28 +01:00
Claude Paroz c716fe8782 Refs #23919 -- Removed six.PY2/PY3 usage
Thanks Tim Graham for the review.
2017-01-18 16:21:28 +01:00
Claude Paroz d7b9aaa366 Refs #23919 -- Removed encoding preambles and future imports 2017-01-18 09:55:19 +01:00
za 321e94fa41 Refs #27392 -- Removed "Tests that", "Ensures that", etc. from test docstrings. 2016-11-10 21:30:21 -05:00
Tim Graham 414ad25b09 Fixed #27327 -- Simplified time zone handling by requiring pytz. 2016-10-27 08:53:20 -04:00
Denis Cornehl a840710e1e Fixed #26447 -- Deprecated settings.USE_ETAGS in favor of ConditionalGetMiddleware. 2016-10-10 14:55:59 -04:00
Tim Graham 82f8996785 Refs #5133 -- Isolated test_close() cache test. 2016-09-15 08:59:39 -04:00
Rinat Khabibiev f9702977b7 Fixed #27211 -- Made UpdateCacheMiddleware include caching headers for "304 Not Modified" responses. 2016-09-14 19:37:18 -04:00
Tim Graham ef021412d5 Normalized spelling of ETag. 2016-09-09 11:00:21 -04:00
Ed Morley f02dbbe1ae Fixed #11331 -- Stopped closing pylibmc connections after each request.
libmemcached manages its own connections, so isn't affected by refs #5133.
2016-09-02 14:44:27 -04:00
Ed Morley 3e935aec6d Refs #5133 -- Tested memcached connection closing after each request. 2016-09-02 14:36:36 -04:00
Ed Morley d8ef5b0e65 Fixed #27152 -- Supported comma delimiter in memcached LOCATION string. 2016-08-31 17:23:41 -04:00
Ed Morley c8058dc241 Added a test for multiple memcached servers in LOCATION. 2016-08-31 17:16:11 -04:00
Ed Morley 65ec8fa8ca Fixed #20892 -- Allowed configuring memcached client using OPTIONS.
Previously, the MemcachedCache backend ignored `OPTIONS` and
PyLibMCCache used them to set pylibmc behaviors. Both backends now
pass `OPTIONS` as keyword arguments to the client constructors.
2016-08-31 12:50:14 -04:00
Ed Morley cf45bb02d7 Removed unused variable in test_memcached_uses_highest_pickle_version 2016-08-31 12:15:42 -04:00
Ed Morley 674e3fe13e Fixed #19914 -- Fixed test failures with pylibmc. 2016-08-29 11:03:59 -04:00
Ed Morley 047c1d48a6 Fixed #27132 -- Allowed testing MemcachedCache and PyLibMCCache during the same test run. 2016-08-29 10:57:52 -04:00
Ed Morley cfd1f93d55 Refs #19914 -- Split the test_invalid_keys cache test into two.
The first half of the test fails when using pylibmc (so will need
to be skipped).
2016-08-29 10:21:20 -04:00