mirror of
				https://github.com/django/django.git
				synced 2025-10-30 17:16:10 +00:00 
			
		
		
		
	[2.0.x] Refs #27318 -- Made DummyCache.set_many() return a list for consistency with other backends.
Backport of abacd09f07 from master
			
			
This commit is contained in:
		
							
								
								
									
										2
									
								
								django/core/cache/backends/dummy.py
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								django/core/cache/backends/dummy.py
									
									
									
									
										vendored
									
									
								
							| @@ -34,7 +34,7 @@ class DummyCache(BaseCache): | |||||||
|         return False |         return False | ||||||
|  |  | ||||||
|     def set_many(self, data, timeout=DEFAULT_TIMEOUT, version=None): |     def set_many(self, data, timeout=DEFAULT_TIMEOUT, version=None): | ||||||
|         pass |         return [] | ||||||
|  |  | ||||||
|     def delete_many(self, keys, version=None): |     def delete_many(self, keys, version=None): | ||||||
|         pass |         pass | ||||||
|   | |||||||
							
								
								
									
										4
									
								
								tests/cache/tests.py
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										4
									
								
								tests/cache/tests.py
									
									
									
									
										vendored
									
									
								
							| @@ -175,8 +175,8 @@ class DummyCacheTests(SimpleTestCase): | |||||||
|  |  | ||||||
|     def test_set_many(self): |     def test_set_many(self): | ||||||
|         "set_many does nothing for the dummy cache backend" |         "set_many does nothing for the dummy cache backend" | ||||||
|         cache.set_many({'a': 1, 'b': 2}) |         self.assertEqual(cache.set_many({'a': 1, 'b': 2}), []) | ||||||
|         cache.set_many({'a': 1, 'b': 2}, timeout=2, version='1') |         self.assertEqual(cache.set_many({'a': 1, 'b': 2}, timeout=2, version='1'), []) | ||||||
|  |  | ||||||
|     def test_delete_many(self): |     def test_delete_many(self): | ||||||
|         "delete_many does nothing for the dummy cache backend" |         "delete_many does nothing for the dummy cache backend" | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user