diff options
author | Michał Górny <mgorny@gentoo.org> | 2017-10-26 17:05:17 +0200 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2017-10-26 17:05:17 +0200 |
commit | 78d6a4a54dafeb862e9dd9aad7de91350ca84555 (patch) | |
tree | 00a8ba4ac4dc52be10002173e00f6d1ba4cabb65 /tests/test_verify.py | |
parent | 84dd4bdc2cbbbfceaa101fe75cc7a243c1112946 (diff) | |
download | gemato-78d6a4a54dafeb862e9dd9aad7de91350ca84555.tar.gz |
verify: Remove assert_path_verifies()
Now all callsites are inlined.
Diffstat (limited to 'tests/test_verify.py')
-rw-r--r-- | tests/test_verify.py | 36 |
1 files changed, 1 insertions, 35 deletions
diff --git a/tests/test_verify.py b/tests/test_verify.py index bc41532..2b656a8 100644 --- a/tests/test_verify.py +++ b/tests/test_verify.py @@ -262,7 +262,7 @@ class EmptyFileVerificationTest(unittest.TestCase): e = gemato.manifest.ManifestEntryDATA.from_list( ('DATA', os.path.basename(self.path), '0')) self.assertRaises(gemato.exceptions.ManifestCrossDevice, - gemato.verify.assert_path_verifies, self.path, e, + gemato.verify.verify_path, self.path, e, expected_dev=st.st_dev) @@ -495,40 +495,6 @@ class UnreadableFileVerificationTest(unittest.TestCase): os.path.join(self.dir, e.path), e) -class ExceptionVerificationTest(object): - def setUp(self): - TEST_STRING = b'The quick brown fox jumps over the lazy dog' - self.f = tempfile.NamedTemporaryFile() - self.f.write(TEST_STRING) - self.f.flush() - self.path = self.f.name - - def tearDown(self): - self.f.close() - - def testDATA(self): - e = gemato.manifest.ManifestEntryDATA.from_list( - ('DATA', os.path.basename(self.path), '43')) - gemato.verify.assert_path_verifies(self.path, e) - - def testChecksumDATA(self): - e = gemato.manifest.ManifestEntryDATA.from_list( - ('DATA', os.path.basename(self.path), '43', - 'MD5', '9e107d9d372bb6826bd81d3542a419d6', - 'SHA1', '2fd4e1c67a2d28fced849ee1bb76e7391b93eb12')) - gemato.verify.assert_path_verifies(self.path, e) - - def testWrongSizeDATA(self): - e = gemato.manifest.ManifestEntryDATA.from_list( - ('DATA', os.path.basename(self.path), '0')) - self.assertRaises(gemato.exceptions.ManifestMismatch, - gemato.verify.assert_path_verifies, self.path, e) - - def testNone(self): - self.assertRaises(gemato.exceptions.ManifestMismatch, - gemato.verify.gemato.verify.assert_path_verifies, self.path, None) - - class EntryCompatibilityVerificationTest(unittest.TestCase): def test_matching_entry(self): e1 = gemato.manifest.ManifestEntryDATA.from_list( |