made index.TestCase run independant of cwd
This commit is contained in:
parent
edb8d105b0
commit
37e0dce73b
|
@ -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")
|
||||
|
|
Loading…
Reference in New Issue