changeset 7a4ee9cbc58f in /home/hg/repos/gajim
details:http://hg.gajim.org/gajim?cmd=changeset;node=7a4ee9cbc58f description: Rename CacheItem.update to CacheItem.set_and_store as this seems more intense giving.
diffstat:
src/common/caps.py | 4 ++-- test/test_caps.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-)
diffs (38 lines):
diff -r a87fa3bf81bb -r 7a4ee9cbc58f src/common/caps.py --- a/src/common/caps.py Fri Oct 30 23:55:03 2009 +0100 +++ b/src/common/caps.py Sat Oct 31 09:14:55 2009 +0100 @@ -278,7 +278,7 @@ 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 @@ 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 -r a87fa3bf81bb -r 7a4ee9cbc58f test/test_caps.py --- a/test/test_caps.py Fri Oct 30 23:55:03 2009 +0100 +++ b/test/test_caps.py Sat Oct 31 09:14:55 2009 +0100 @@ -55,11 +55,11 @@ 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)