mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-11-04 22:40:29 +03:00
made index.TestCase run independant of cwd
This commit is contained in:
parent
edb8d105b0
commit
37e0dce73b
1 changed files with 3 additions and 1 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue