mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-11-15 11:40:30 +03:00
tests: use standard dir setup so all tests start in same dir
This commit is contained in:
parent
3ff4b656c6
commit
5b22ff7dc6
6 changed files with 96 additions and 97 deletions
|
|
@ -3,6 +3,7 @@
|
|||
# http://www.drdobbs.com/testing/unit-testing-with-python/240165163
|
||||
|
||||
import inspect
|
||||
import logging
|
||||
import optparse
|
||||
import os
|
||||
import requests
|
||||
|
|
@ -24,8 +25,15 @@ import import_proxy
|
|||
class ImportTest(unittest.TestCase):
|
||||
'''fdroid import'''
|
||||
|
||||
def setUp(self):
|
||||
logging.basicConfig(level=logging.DEBUG)
|
||||
self.basedir = os.path.join(localmodule, 'tests')
|
||||
self.tmpdir = os.path.abspath(os.path.join(self.basedir, '..', '.testfiles'))
|
||||
if not os.path.exists(self.tmpdir):
|
||||
os.makedirs(self.tmpdir)
|
||||
os.chdir(self.basedir)
|
||||
|
||||
def test_import_gitlab(self):
|
||||
os.chdir(os.path.dirname(__file__))
|
||||
# FDroidPopen needs some config to work
|
||||
config = dict()
|
||||
fdroidserver.common.fill_config_defaults(config)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue