self = <swh.model.tests.test_cli.TestIdentify testMethod=test_snapshot_id>
def test_snapshot_id(self):
"""identify a snapshot"""
tarball = os.path.join(
os.path.dirname(__file__), "data", "repos", "sample-repo.tgz"
)
with tempfile.TemporaryDirectory(prefix="swh.model.cli") as d:
with tarfile.open(tarball, "r:gz") as t:
t.extractall(d)
repo_dir = os.path.join(d, "sample-repo")
result = self.runner.invoke(
cli.identify, ["--type", "snapshot", repo_dir]
)
self.assertSWHID(
> result, "swh:1:snp:abc888898124270905a0ef3c67e872ce08e7e0c1"
)
.tox/py3/lib/python3.7/site-packages/swh/model/tests/test_cli.py:68:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/py3/lib/python3.7/site-packages/swh/model/tests/test_cli.py:27: in assertSWHID
self.assertEqual(result.output.split()[0], swhid)
E AssertionError: 'File' != 'swh:1:snp:abc888898124270905a0ef3c67e872ce08e7e0c1'
E - File
E + swh:1:snp:abc888898124270905a0ef3c67e872ce08e7e0c1
TEST RESULT
TEST RESULT
- Run At
- Feb 16 2021, 2:43 PM