Changeset View
Changeset View
Standalone View
Standalone View
swh/journal/tests/conftest.py
Show All 30 Lines | CONTENTS = [ | ||||
'34973274ccef6ab4dfaaf86599792fa9c3fe4689'), | '34973274ccef6ab4dfaaf86599792fa9c3fe4689'), | ||||
'sha1_git': b'foo', | 'sha1_git': b'foo', | ||||
'blake2s256': b'bar', | 'blake2s256': b'bar', | ||||
'sha256': b'baz', | 'sha256': b'baz', | ||||
'status': 'visible', | 'status': 'visible', | ||||
}, | }, | ||||
] | ] | ||||
duplicate_content1 = { | |||||
'length': 4, | |||||
'sha1': hash_to_bytes( | |||||
'44973274ccef6ab4dfaaf86599792fa9c3fe4689'), | |||||
'sha1_git': b'foosha1', | |||||
'blake2s256': b'barblake', | |||||
'sha256': b'bazsha256', | |||||
'status': 'visible', | |||||
} | |||||
duplicate_content2 = duplicate_content1.copy() | |||||
sha1_array = bytearray(duplicate_content1['sha1']) | |||||
sha1_array[0] += 1 | |||||
duplicate_content2['sha1'] = bytes(sha1_array) | |||||
DUPLICATE_CONTENTS = [duplicate_content1, duplicate_content2] | |||||
COMMITTERS = [ | COMMITTERS = [ | ||||
{ | { | ||||
'fullname': b'foo', | 'fullname': b'foo', | ||||
'name': b'foo', | 'name': b'foo', | ||||
'email': b'', | 'email': b'', | ||||
}, | }, | ||||
{ | { | ||||
'fullname': b'bar', | 'fullname': b'bar', | ||||
▲ Show 20 Lines • Show All 199 Lines • Show Last 20 Lines |