self = <swh.model.tests.test_from_disk.FileToContent testMethod=test_file_to_content_model>
def test_file_to_content_model(self):
for filename, content in self.contents.items():
path = os.path.join(self.tmpdir_name, filename)
> model_content = Content.from_file(path=path).to_model()
.tox/py3/lib/python3.7/site-packages/swh/model/tests/test_from_disk.py:604:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/py3/lib/python3.7/site-packages/swh/model/from_disk.py:226: in to_model
return DiskBackedContent.from_dict(data)
.tox/py3/lib/python3.7/site-packages/swh/model/from_disk.py:58: in from_dict
return cls(**d)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = DiskBackedContent(sha1=b'4\x972t\xcc\xefj\xb4\xdf\xaa\xf8e\x99y/\xa9\xc3\xfeF\x89', sha1_git=b'\xd8\x1c\xc0q\x0e\xb6\x...x7fVf\x95dW}\xd9<B\x80\xe7mf\x1d", length=3, status=NOTHING, ctime=None, path=b'/tmp/swh.model.from_disk7ro11iqv/file')
sha1 = b'4\x972t\xcc\xefj\xb4\xdf\xaa\xf8e\x99y/\xa9\xc3\xfeF\x89'
sha1_git = b'\xd8\x1c\xc0q\x0e\xb6\xcf\x9e\xfd[\x92\n\x84S\xe1\xe0qW\xb6\xcd'
sha256 = b'\x08Ly\x9c\xd5Q\xdd\x1d\x8d\\_\x9a]Y;.\x93\x1f^6\x12.\xe5\xc7\x93\xc1\xd0\x8a\x19\x83\x9c\xc0'
blake2s256 = b"\xd5\xfe\x199We'\xe4,\xfdv\xa9EZ$2\xfe\x7fVf\x95dW}\xd9<B\x80\xe7mf\x1d"
length = 3, status = 'visible', ctime = None
path = b'/tmp/swh.model.from_disk7ro11iqv/file'
def __init__(self, sha1, sha1_git, sha256, blake2s256, length, status=attr_dict['status'].default, ctime=attr_dict['ctime'].default, path=attr_dict['path'].default):
_setattr = _cached_setattr.__get__(self, self.__class__)
_inst_dict = self.__dict__
_inst_dict['sha1'] = sha1
_inst_dict['sha1_git'] = sha1_git
_inst_dict['sha256'] = sha256
_inst_dict['blake2s256'] = blake2s256
_inst_dict['length'] = length
_inst_dict['status'] = status
_inst_dict['ctime'] = ctime
_inst_dict['path'] = path
if _config._run_validators is True:
__attr_validator_sha1(self, __attr_sha1, self.sha1)
__attr_validator_sha1_git(self, __attr_sha1_git, self.sha1_git)
__attr_validator_sha256(self, __attr_sha256, self.sha256)
__attr_validator_blake2s256(self, __attr_blake2s256, self.blake2s256)
__attr_validator_length(self, __attr_length, self.length)
> __attr_validator_status(self, __attr_status, self.status)
E AttributeError: status
<attrs generated init swh.model.from_disk.DiskBackedContent>:18: AttributeError
TEST RESULT
TEST RESULT
- Run At
- Dec 14 2020, 5:40 PM