"""
super(KeysEqual, self).__init__()
try:
- self.expected = expected.keys()
+ self.expected = expected[0].keys()
except AttributeError:
self.expected = list(expected)
]
-class TestKeysEqual(TestCase, TestMatchersInterface):
+class TestKeysEqualWithList(TestCase, TestMatchersInterface):
matches_matcher = KeysEqual('foo', 'bar')
matches_matches = [
% (matchee,)))
+class TestKeysEqualWithDict(TestKeysEqualWithList):
+
+ matches_matcher = KeysEqual({'foo': 3, 'bar': 4})
+
+
class TestSubDictOf(TestCase, TestMatchersInterface):
matches_matcher = _SubDictOf({'foo': 'bar', 'baz': 'qux'})