Page MenuHomeSoftware Heritage

Jenkins > .tox.py3.lib.python3.7.site-packages.swh.storage.tests.test_api_client.TestStorageApi::test_revision_add_no_committer_or_date
Failed

TEST RESULT

Run At
Mar 21 2022, 3:28 PM
Details
self = <swh.storage.tests.test_api_client.TestStorageApi object at 0x7fb8aa0c8668> swh_storage = <RemoteStorage url=mock://example.com/> sample_data = <swh.storage.tests.storage_data.StorageData object at 0x7fb8ae4984a8> def test_revision_add_no_committer_or_date(self, swh_storage, sample_data): full_revision = sample_data.revision with disable_attrs_validator(): # TODO: remove context manager when support for author=None # lands in swh-model revision = attr.evolve(full_revision, committer=None, committer_date=None) > revision = attr.evolve(revision, id=revision.compute_hash()) .tox/py3/lib/python3.7/site-packages/swh/storage/tests/storage_tests.py:1352: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ .tox/py3/lib/python3.7/site-packages/swh/model/model.py:269: in compute_hash return super().compute_hash() .tox/py3/lib/python3.7/site-packages/swh/model/model.py:221: in compute_hash return self._compute_hash_from_attributes() .tox/py3/lib/python3.7/site-packages/swh/model/model.py:878: in _compute_hash_from_attributes return _compute_hash_from_manifest(git_objects.revision_git_object(self)) .tox/py3/lib/python3.7/site-packages/swh/model/git_objects.py:345: in revision_git_object (b"committer", format_author_data(revision.committer, revision.committer_date),) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ author = None, date_offset = None def format_author_data( author: model.Person, date_offset: Optional[model.TimestampWithTimezone] ) -> bytes: """Format authorship data according to git standards. Git authorship data has two components: - an author specification, usually a name and email, but in practice an arbitrary bytestring - optionally, a timestamp with a UTC offset specification The authorship data is formatted thus:: `name and email`[ `timestamp` `utc_offset`] The timestamp is encoded as a (decimal) number of seconds since the UNIX epoch (1970-01-01 at 00:00 UTC). As an extension to the git format, we support fractional timestamps, using a dot as the separator for the decimal part. The utc offset is a number of minutes encoded as '[+-]HHMM'. Note that some tools can pass a negative offset corresponding to the UTC timezone ('-0000'), which is valid and is encoded as such. Returns: the byte string containing the authorship data """ > ret = [author.fullname] E AttributeError: 'NoneType' object has no attribute 'fullname' .tox/py3/lib/python3.7/site-packages/swh/model/git_objects.py:267: AttributeError