Onionr/tests/test_filepaths.py

19 lines
584 B
Python
Raw Normal View History

2019-09-14 06:29:31 +00:00
import sys, os
sys.path.append(".")
2019-11-21 09:26:23 +00:00
sys.path.append("src/")
2019-09-14 06:29:31 +00:00
import unittest, uuid
TEST_DIR = 'testdata/%s-%s' % (uuid.uuid4(), os.path.basename(__file__)) + '/'
print("Test directory:", TEST_DIR)
os.environ["ONIONR_HOME"] = TEST_DIR
import filepaths
from utils import identifyhome
class TestFilePaths(unittest.TestCase):
def test_filepaths_main(self):
home = identifyhome.identify_home()
self.assertTrue(filepaths.home.startswith(home))
2019-09-20 16:25:12 +00:00
def test_app_root_path(self):
self.assertTrue(os.path.exists(filepaths.app_root + '/onionr.sh'))
2019-09-14 06:29:31 +00:00
unittest.main()