diff options
| author | Ed Morley <emorley@mozilla.com> | 2016-08-31 18:14:29 +0100 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2016-08-31 17:16:11 -0400 |
| commit | c8058dc241e7eea49ea6cf0e0abe7c4c38b79783 (patch) | |
| tree | d3e981ee12fe04f574be5e001f323f8fca1c4d1c /tests | |
| parent | 59afe61a970dd60df388e7cda9041ef3c0e770cb (diff) | |
Added a test for multiple memcached servers in LOCATION.
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/cache/tests.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/cache/tests.py b/tests/cache/tests.py index c5fb42f476..f31b3e1957 100644 --- a/tests/cache/tests.py +++ b/tests/cache/tests.py @@ -1156,6 +1156,16 @@ memcached_excluded_caches = {'cull', 'zero_cull'} class BaseMemcachedTests(BaseCacheTests): + def test_location_multiple_servers(self): + locations = [ + ['server1.tld', 'server2:11211'], + 'server1.tld;server2:11211', + ] + for location in locations: + params = {'BACKEND': self.base_params['BACKEND'], 'LOCATION': location} + with self.settings(CACHES={'default': params}): + self.assertEqual(cache._servers, ['server1.tld', 'server2:11211']) + def test_invalid_key_characters(self): """ On memcached, we don't introduce a duplicate key validation |
