def test_write_additions_with_privileged_test_objects():
writer = InMemoryJournalWriter[BaseModel](
value_sanitizer=model_object_dict_sanitizer
)
expected = []
for object_type, objects in TEST_OBJECTS.items():
writer.write_additions(object_type, objects, True)
for object in objects:
expected.append((object_type, object))
> assert sorted(expected) == sorted(writer.privileged_objects)
.tox/py3/lib/python3.7/site-packages/swh/journal/tests/test_inmemory.py:38:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = Snapshot(branches=ImmutableDict({b'target/revision': SnapshotBranch(target=b"f\xc7\xc1\xcd\x96s'P7\x14\x0f*\xbf\xf7\xb...e=<TargetType.SNAPSHOT: 'snapshot'>)}), id=b'\t\xef\xff\xaa\xad\x8d\x1f\x9c\x7f\x94\x02\xdb\x02f\xdb\xe2\x80\x82\x85?')
other = Snapshot(branches=ImmutableDict({b'master': SnapshotBranch(target=b"f\xc7\xc1\xcd\x96s'P7\x14\x0f*\xbf\xf7\xb7\xb1\x1f\xc9C\x9c", target_type=<TargetType.REVISION: 'revision'>)}), id=b'\x9ex\xd7\x10\\^\x0f\x88d\x87Q\x1e*\x927{N\xe4\xc3*')
def __lt__(self, other):
"""
Automatically created by attrs.
"""
if other.__class__ is self.__class__:
> return attrs_to_tuple(self) < attrs_to_tuple(other)
E TypeError: '<' not supported between instances of 'ImmutableDict' and 'ImmutableDict'
.tox/py3/lib/python3.7/site-packages/attr/_make.py:1625: TypeError
TEST RESULT
TEST RESULT
- Run At
- Apr 30 2021, 11:20 AM