Rename CacheItem.update to CacheItem.set_and_store as this seems more intense giving.
This commit is contained in:
parent
99e8487db9
commit
47700e67da
|
@ -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()
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue