From 47700e67da735fb6295c9c96f351c751b0db2948 Mon Sep 17 00:00:00 2001 From: Stephan Erb <steve-e@h3c.de> Date: Sat, 31 Oct 2009 09:14:55 +0100 Subject: [PATCH] Rename CacheItem.update to CacheItem.set_and_store as this seems more intense giving. --- src/common/caps.py | 4 ++-- test/test_caps.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/common/caps.py b/src/common/caps.py index 4653454e1e..f676ad2658 100644 --- a/src/common/caps.py +++ b/src/common/caps.py @@ -278,7 +278,7 @@ class CapsCache(object): identities = property(_get_identities, _set_identities) - def update(self, identities, features): + def set_and_store(self, identities, features): self.identities = identities self.features = features self._logger.add_caps_entry(self.hash_method, self.hash, @@ -391,7 +391,7 @@ class ConnectionCaps(object): hash_is_valid = validate(identities, features, dataforms) if hash_is_valid: - cache_item.update(identities, features) + cache_item.set_and_store(identities, features) else: contact.client_caps = NullClientCaps() diff --git a/test/test_caps.py b/test/test_caps.py index 627e0342d2..787047c1f6 100644 --- a/test/test_caps.py +++ b/test/test_caps.py @@ -55,11 +55,11 @@ class TestCapsCache(CommonCapsTest): self.assertEqual('client', identity['category']) self.assertEqual('pc', identity['type']) - def test_update(self): + def test_set_and_store(self): ''' Test client_caps update gets logged into db ''' item = self.cc[self.client_caps] - item.update(self.identities, self.features) + item.set_and_store(self.identities, self.features) self.logger.mockCheckCall(0, "add_caps_entry", self.caps_method, self.caps_hash, self.identities, self.features) -- GitLab