From 9c697f6812899d002ee411807fe85611b163a8b7 Mon Sep 17 00:00:00 2001 From: David Douard <david.douard@sdfa3.org> Date: Thu, 2 Apr 2020 15:18:00 +0200 Subject: [PATCH] test: use Multihash to create a valid dict for a Content object --- swh/journal/tests/conftest.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/swh/journal/tests/conftest.py b/swh/journal/tests/conftest.py index 36365a5..b8b4c2e 100644 --- a/swh/journal/tests/conftest.py +++ b/swh/journal/tests/conftest.py @@ -20,19 +20,15 @@ from pytest_kafka import ( ) from swh.model import hypothesis_strategies as strategies -from swh.model.hashutil import hash_to_bytes +from swh.model.hashutil import MultiHash, hash_to_bytes logger = logging.getLogger(__name__) CONTENTS = [ { + **MultiHash.from_data(b'foo').digest(), 'length': 3, - 'sha1': hash_to_bytes( - '34973274ccef6ab4dfaaf86599792fa9c3fe4689'), - 'sha1_git': b'foo', - 'blake2s256': b'bar', - 'sha256': b'baz', 'status': 'visible', }, ] -- GitLab