================================================================================================================== FAILURES =================================================================================================================== _____________________________________________________________________________________________________ TestStorage.test_revision_get_order _____________________________________________________________________________________________________ self = , swh_storage = sample_data_model = {'authority': [MetadataAuthority(type=, url='http://hal.inria....\x11', length=7, status='visible', data=b'424242\n', ctime=datetime.datetime(2019, 12, 1, 0, 0, tzinfo=tzutc()))], ...} def test_revision_get_order(self, swh_storage, sample_data_model): revision, revision2 = sample_data_model["revision"][:2] add_result = swh_storage.revision_add([revision, revision2]) assert add_result == {"revision:add": 2} # order 1 res1 = swh_storage.revision_get([revision.id, revision2.id]) import pdb; pdb.set_trace() > assert list(res1) == [revision.to_dict(), revision2.to_dict()] E assert [{'author': {'email': b'nicolas@example.com',\n 'fullname': b'Nicolas Dandrimont ',\n 'name': b'Nicolas Dandrimont'},\n 'committer': {'email': b'stefano@example.com',\n 'fullname': b'St\xc3fano Zacchiroli ',\n 'name': b'St\xc3fano Zacchiroli'},\n 'committer_date': {'negative_utc': True,\n 'offset': 0,\n 'timestamp': {'microseconds': 0, 'seconds': 1123456789}},\n 'date': {'negative_utc': False,\n 'offset': 120,\n 'timestamp': {'microseconds': 0, 'seconds': 1234567890}},\n 'directory': b'4\xf35\xa7P\x11\x1c\xa0\xa8\xb6M\x804\xfa\xec\x9e'\n b'\xed\xc3\x96\xbe',\n 'extra_headers': [[b'gpgsig', b'test123'],\n [b'mergetag', b'foo\\bar'],\n [b'mergetag', b'"\xaf\x89\x80\x01\x00']],\n 'id': b'\x06k\x1bb\xdb\xfa\x033b\t*\xf4h\xbfl\xfa\xbe\xc20\xe7',\n 'message': b'hello',\n 'metadata': {'checksums': {'sha1': 'tarball-sha1',\n 'sha256': 'tarball-sha256'},\n 'signed-off-by': 'some-dude'},\n 'parents': [b'01234567890123456789', b'23434512345123456789'],\n 'synthetic': True,\n 'type': 'git'},\n {'author': {'email': b'roberto@example.com',\n 'fullname': b'Roberto Dicosmo ',\n 'name': b'Roberto Dicosmo'},\n 'committer': {'email': b'ar@dumont.fr',\n 'fullname': b'tony ',\n 'name': b'tony'},\n 'committer_date': {'negative_utc': False,\n 'offset': 0,\n 'timestamp': {'microseconds': 0, 'seconds': 1123456789}},\n 'date': {'negative_utc': False,\n 'offset': -720,\n 'timestamp': {'microseconds': 220000, 'seconds': 1234567843}},\n 'directory': b'\x85\x05\x80\x852\x95=\xa7\xd2X\x17A\xf0\x1b)\xc0K\x1c\xb9\xab',\n 'extra_headers': [],\n 'id': b'\xdfzoj\x99g\x1f\xb7\xf746A\xaf\xf9\x83\xa3\x14\xefaa',\n 'message': b'hello again',\n 'metadata': None,\n 'parents': [b'01234567890123456789'],\n 'synthetic': False,\n 'type': 'git'}] == [{'author': {'email': b'nicolas@example.com',\n 'fullname': b'Nicolas Dandrimont ',\n 'name': b'Nicolas Dandrimont'},\n 'committer': {'email': b'stefano@example.com',\n 'fullname': b'St\xc3fano Zacchiroli ',\n 'name': b'St\xc3fano Zacchiroli'},\n 'committer_date': {'negative_utc': True,\n 'offset': 0,\n 'timestamp': {'microseconds': 0, 'seconds': 1123456789}},\n 'date': {'negative_utc': False,\n 'offset': 120,\n 'timestamp': {'microseconds': 0, 'seconds': 1234567890}},\n 'directory': b'4\xf35\xa7P\x11\x1c\xa0\xa8\xb6M\x804\xfa\xec\x9e'\n b'\xed\xc3\x96\xbe',\n 'extra_headers': ((b'gpgsig', b'test123'),\n (b'mergetag', b'foo\\bar'),\n (b'mergetag', b'"\xaf\x89\x80\x01\x00')),\n 'id': b'\x06k\x1bb\xdb\xfa\x033b\t*\xf4h\xbfl\xfa\xbe\xc20\xe7',\n 'message': b'hello',\n 'metadata': {'checksums': {'sha1': 'tarball-sha1',\n 'sha256': 'tarball-sha256'},\n 'signed-off-by': 'some-dude'},\n 'parents': (b'01234567890123456789', b'23434512345123456789'),\n 'synthetic': True,\n 'type': 'git'},\n {'author': {'email': b'roberto@example.com',\n 'fullname': b'Roberto Dicosmo ',\n 'name': b'Roberto Dicosmo'},\n 'committer': {'email': b'ar@dumont.fr',\n 'fullname': b'tony ',\n 'name': b'tony'},\n 'committer_date': {'negative_utc': False,\n 'offset': 0,\n 'timestamp': {'microseconds': 0, 'seconds': 1123456789}},\n 'date': {'negative_utc': False,\n 'offset': -720,\n 'timestamp': {'microseconds': 220000, 'seconds': 1234567843}},\n 'directory': b'\x85\x05\x80\x852\x95=\xa7\xd2X\x17A\xf0\x1b)\xc0K\x1c\xb9\xab',\n 'extra_headers': (),\n 'id': b'\xdfzoj\x99g\x1f\xb7\xf746A\xaf\xf9\x83\xa3\x14\xefaa',\n 'message': b'hello again',\n 'metadata': None,\n 'parents': (b'01234567890123456789',),\n 'synthetic': False,\n 'type': 'git'}] E At index 0 diff: {'message': b'hello', 'author': {'fullname': b'Nicolas Dandrimont ', 'name': b'Nicolas Dandrimont', 'email': b'nicolas@example.com'}, 'committer': {'fullname': b'St\xc3fano Zacchiroli ', 'name': b'St\xc3fano Zacchiroli', 'email': b'stefano@example.com'}, 'date': {'timestamp': {'seconds': 1234567890, 'microseconds': 0}, 'offset': 120, 'negative_utc': False}, 'committer_date': {'timestamp': {'seconds': 1123456789, 'microseconds': 0}, 'offset': 0, 'negative_utc': True}, 'type': 'git', 'directory': b'4\xf35\xa7P\x11\x1c\xa0\xa8\xb6M\x804\xfa\xec\x9e\xed\xc3\x96\xbe', 'synthetic': True, 'metadata': {'checksums': {'sha1': 'tarball-sha1', 'sha256': 'tarball-sha256'}, 'signed-off-by': 'some-dude'}, 'parents': [b'01234567890123456789', b'23434512345123456789'], 'id': b'\x06k\x1bb\xdb\xfa\x033b\t*\xf4h\xbfl\xfa\xbe\xc20\xe7', 'extra_headers': [[b'gpgsig', b'test123'], [b'mergetag', b'foo\\bar'], [b'mergetag', b'"\xaf\x89\x80\x01\x00']]} != {'message': b'hello', 'author': {'fullname': b'Nicolas Dandrimont ', 'name': b'Nicolas Dandrimont', 'email': b'nicolas@example.com'}, 'committer': {'fullname': b'St\xc3fano Zacchiroli ', 'name': b'St\xc3fano Zacchiroli', 'email': b'stefano@example.com'}, 'date': {'timestamp': {'seconds': 1234567890, 'microseconds': 0}, 'offset': 120, 'negative_utc': False}, 'committer_date': {'timestamp': {'seconds': 1123456789, 'microseconds': 0}, 'offset': 0, 'negative_utc': True}, 'type': 'git', 'directory': b'4\xf35\xa7P\x11\x1c\xa0\xa8\xb6M\x804\xfa\xec\x9e\xed\xc3\x96\xbe', 'synthetic': True, 'metadata': {'checksums': {'sha1': 'tarball-sha1', 'sha256': 'tarball-sha256'}, 'signed-off-by': 'some-dude'}, 'parents': (b'01234567890123456789', b'23434512345123456789'), 'id': b'\x06k\x1bb\xdb\xfa\x033b\t*\xf4h\xbfl\xfa\xbe\xc20\xe7', 'extra_headers': ((b'gpgsig', b'test123'), (b'mergetag', b'foo\\bar'), (b'mergetag', b'"\xaf\x89\x80\x01\x00'))} E Full diff: E [ E {'author': {'email': b'nicolas@example.com', E 'fullname': b'Nicolas Dandrimont ', E 'name': b'Nicolas Dandrimont'}, E 'committer': {'email': b'stefano@example.com', E 'fullname': b'St\xc3fano Zacchiroli ', E 'name': b'St\xc3fano Zacchiroli'}, E 'committer_date': {'negative_utc': True, E 'offset': 0, E 'timestamp': {'microseconds': 0, 'seconds': 1123456789}}, E 'date': {'negative_utc': False, E 'offset': 120, E 'timestamp': {'microseconds': 0, 'seconds': 1234567890}}, E 'directory': b'4\xf35\xa7P\x11\x1c\xa0\xa8\xb6M\x804\xfa\xec\x9e' E b'\xed\xc3\x96\xbe', E - 'extra_headers': ((b'gpgsig', b'test123'), E ? ^^ ^ E + 'extra_headers': [[b'gpgsig', b'test123'], E ? ^^ ^ E - (b'mergetag', b'foo\\bar'), E ? ^ ^ E + [b'mergetag', b'foo\\bar'], E ? ^ ^ E - (b'mergetag', b'"\xaf\x89\x80\x01\x00')), E ? ^ ^^ E + [b'mergetag', b'"\xaf\x89\x80\x01\x00']], E ? ^ ^^ E 'id': b'\x06k\x1bb\xdb\xfa\x033b\t*\xf4h\xbfl\xfa\xbe\xc20\xe7', E 'message': b'hello', E 'metadata': {'checksums': {'sha1': 'tarball-sha1', E 'sha256': 'tarball-sha256'}, E 'signed-off-by': 'some-dude'}, E - 'parents': (b'01234567890123456789', b'23434512345123456789'), E ? ^ ^ E + 'parents': [b'01234567890123456789', b'23434512345123456789'], E ? ^ ^ E 'synthetic': True, E 'type': 'git'}, E {'author': {'email': b'roberto@example.com', E 'fullname': b'Roberto Dicosmo ', E 'name': b'Roberto Dicosmo'}, E 'committer': {'email': b'ar@dumont.fr', E 'fullname': b'tony ', E 'name': b'tony'}, E 'committer_date': {'negative_utc': False, E 'offset': 0, E 'timestamp': {'microseconds': 0, 'seconds': 1123456789}}, E 'date': {'negative_utc': False, E 'offset': -720, E 'timestamp': {'microseconds': 220000, 'seconds': 1234567843}}, E 'directory': b'\x85\x05\x80\x852\x95=\xa7\xd2X\x17A\xf0\x1b)\xc0K\x1c\xb9\xab', E - 'extra_headers': (), E ? ^^ E + 'extra_headers': [], E ? ^^ E 'id': b'\xdfzoj\x99g\x1f\xb7\xf746A\xaf\xf9\x83\xa3\x14\xefaa', E 'message': b'hello again', E 'metadata': None, E - 'parents': (b'01234567890123456789',), E ? ^ -- E + 'parents': [b'01234567890123456789'], E ? ^ + E 'synthetic': False, E 'type': 'git'}, E ] .tox/py3/lib/python3.7/site-packages/swh/storage/tests/test_storage.py:963: AssertionError =========================================================================================================== short test summary info =========================================================================================================== FAILED .tox/py3/lib/python3.7/site-packages/swh/storage/tests/test_api_client.py::TestStorage::test_revision_get_order - assert [{'author': {'email': b'nicolas@example.com',\n 'fullname': b'Nicolas Dandrimont