diff options
author | Tristan Van Berkom <tristan.vanberkom@codethink.co.uk> | 2017-09-12 11:38:02 -0400 |
---|---|---|
committer | Tristan Van Berkom <tristan.vanberkom@codethink.co.uk> | 2017-09-12 11:38:02 -0400 |
commit | 5b995dd1543b9476abfe6f1d42dc43cd5d0ea7dc (patch) | |
tree | 6309639402f60e22aaa98ab0a1b44baf438e972f /tests/sources/tar.py | |
parent | c52371ecbc62ff39dc1fd362f064d4e50524ee0a (diff) | |
download | buildstream-5b995dd1543b9476abfe6f1d42dc43cd5d0ea7dc.tar.gz |
tar.py source test case: Stop using tar's private _sha256sum() method
That was removed anyway, now use utils.sha256sum() to calculate
the expected tar ref.
Diffstat (limited to 'tests/sources/tar.py')
-rw-r--r-- | tests/sources/tar.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/tests/sources/tar.py b/tests/sources/tar.py index d586d5b5e..21e44469d 100644 --- a/tests/sources/tar.py +++ b/tests/sources/tar.py @@ -3,6 +3,7 @@ import pytest import tarfile from buildstream import SourceError, Consistency +from buildstream import utils from .fixture import Setup @@ -43,7 +44,7 @@ def test_fetch(tmpdir, datafiles): # Create a local tar src_tar = os.path.join(str(tmpdir), "a.tar.gz") _assemble_tar(str(datafiles), "a", src_tar) - setup.source.ref = setup.source._sha256sum(src_tar) + setup.source.ref = utils.sha256sum(src_tar) # Fetch the source setup.source.fetch() @@ -90,7 +91,7 @@ def test_track(tmpdir, datafiles): # Create a local tar src_tar = os.path.join(str(tmpdir), "a.tar.gz") _assemble_tar(str(datafiles), "a", src_tar) - tar_sha = setup.source._sha256sum(src_tar) + tar_sha = utils.sha256sum(src_tar) assert(tar_sha == setup.source.track()) @@ -125,7 +126,7 @@ def test_stage_default_basedir(tmpdir, datafiles): # Create a local tar src_tar = os.path.join(str(tmpdir), "a.tar.gz") _assemble_tar(str(datafiles), "a", src_tar) - setup.source.ref = setup.source._sha256sum(src_tar) + setup.source.ref = utils.sha256sum(src_tar) # Fetch the source setup.source.fetch() @@ -147,7 +148,7 @@ def test_stage_no_basedir(tmpdir, datafiles): # Create a local tar src_tar = os.path.join(str(tmpdir), "a.tar.gz") _assemble_tar(str(datafiles), "a", src_tar) - setup.source.ref = setup.source._sha256sum(src_tar) + setup.source.ref = utils.sha256sum(src_tar) # Fetch the source setup.source.fetch() |