Fixes typo

This commit is contained in:
Ask Solem 2013-10-02 14:48:30 +01:00
parent 69ecc1ac3e
commit d96241454e
2 changed files with 2 additions and 3 deletions

View File

@ -99,10 +99,9 @@ def _maybe_declare(entity):
ident = hash(entity)
if ident not in declared:
entity.declare()
declared.add(entity)
declared.add(hash(entity))
return True
return False
entity.declare()
return True

View File

@ -80,7 +80,7 @@ class test_maybe_declare(Case):
maybe_declare(entity, channel)
self.assertEqual(entity.declare.call_count, 1)
self.assertIn(entity, channel.connection.client.declared_entities)
self.assertIn(hash(entity), channel.connection.client.declared_entities)
maybe_declare(entity, channel)
self.assertEqual(entity.declare.call_count, 1)