From 5d5617bf40d558438dc624a9cd4014c12f709856 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20P=C3=B6hn?= Date: Mon, 6 Aug 2018 22:13:40 +0200 Subject: [PATCH] fix: minor bugs in testcases for: common, metadata, update --- tests/common.TestCase | 4 ++-- tests/metadata/dump/com.politedroid.yaml | 2 +- tests/signatures.TestCase | 4 +++- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/tests/common.TestCase b/tests/common.TestCase index f5db4f3f..b88436ea 100755 --- a/tests/common.TestCase +++ b/tests/common.TestCase @@ -822,7 +822,7 @@ class CommonTest(unittest.TestCase): '-e', 'ssh -oBatchMode=yes -oIdentitiesOnly=yes -i ssh/id_rsa', cmd[6], - 'example.com:/var/www/fdroid/repo/buildlogs'], + 'example.com:/var/www/fdroid/repo/buildlogs/'], cmd) self.assertTrue(cmd[6].endswith('/com.example.app_4711_1.log.gz')) with gzip.open(cmd[6], 'r') as f: @@ -835,7 +835,7 @@ class CommonTest(unittest.TestCase): '-e', 'ssh -oBatchMode=yes -oIdentitiesOnly=yes -i ssh/id_rsa', cmd[6], - 'example.com:/var/www/fdroid/archive/buildlogs'], + 'example.com:/var/www/fdroid/archive/buildlogs/'], cmd) self.assertTrue(cmd[6].endswith('/com.example.app_4711_1.log.gz')) with gzip.open(cmd[6], 'r') as f: diff --git a/tests/metadata/dump/com.politedroid.yaml b/tests/metadata/dump/com.politedroid.yaml index be2b9f43..f8ab1753 100644 --- a/tests/metadata/dump/com.politedroid.yaml +++ b/tests/metadata/dump/com.politedroid.yaml @@ -22,7 +22,7 @@ License: GPL-3.0-only Litecoin: null MaintainerNotes: '' Name: null -NoSourceSince: '' +NoSourceSince: '1.5' Provides: null Repo: https://github.com/miguelvps/PoliteDroid.git RepoType: git diff --git a/tests/signatures.TestCase b/tests/signatures.TestCase index 276f9144..a019da95 100755 --- a/tests/signatures.TestCase +++ b/tests/signatures.TestCase @@ -49,7 +49,9 @@ class SignaturesTest(unittest.TestCase): '99fbb3211ef5d7c1253f3a7ad4836eadc9905103ce6a75916c40de2831958284'), ) for path, checksum in filesAndHashes: - self.assertTrue(os.path.isfile(path)) + self.assertTrue(os.path.isfile(path), + msg="check whether '{path}' was extracted " + "correctly.".format(path=path)) with open(path, 'rb') as f: self.assertEqual(hashlib.sha256(f.read()).hexdigest(), checksum)