From 37e0dce73bc9a7350b3673b1a17bc6c589544a31 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20P=C3=B6hn?= Date: Tue, 14 Aug 2018 10:08:03 +0200 Subject: [PATCH] made index.TestCase run independant of cwd --- tests/index.TestCase | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/index.TestCase b/tests/index.TestCase index 5baf078e..43db9433 100755 --- a/tests/index.TestCase +++ b/tests/index.TestCase @@ -95,7 +95,7 @@ class IndexTest(unittest.TestCase): head.return_value.headers = {'ETag': 'new_etag'} get.return_value.headers = {'ETag': 'new_etag'} get.return_value.status_code = 200 - testfile = os.path.join(os.path.dirname(__file__), 'signindex', 'guardianproject-v1.jar') + testfile = os.path.join('signindex', 'guardianproject-v1.jar') with open(testfile, 'rb') as file: get.return_value.content = file.read() @@ -217,6 +217,8 @@ class IndexTest(unittest.TestCase): if __name__ == "__main__": + os.chdir(os.path.dirname(__file__)) + parser = optparse.OptionParser() parser.add_option("-v", "--verbose", action="store_true", default=False, help="Spew out even more information than normal")