added identify home test
This commit is contained in:
parent
c7efc1ba08
commit
405e8cdd24
15
onionr/tests/test_identifyhome.py
Normal file
15
onionr/tests/test_identifyhome.py
Normal file
@ -0,0 +1,15 @@
|
||||
#!/usr/bin/env python3
|
||||
import sys, os
|
||||
sys.path.append(".")
|
||||
import unittest, uuid
|
||||
from utils import identifyhome
|
||||
|
||||
class IdentifyHomeTest(unittest.TestCase):
|
||||
def test_standard_linux(self):
|
||||
del os.environ["ONIONR_HOME"]
|
||||
self.assertEqual(identifyhome.identify_home(), os.path.expanduser('~') + '/.local/share/onionr/')
|
||||
def test_environ(self):
|
||||
os.environ["ONIONR_HOME"] = "testhome"
|
||||
self.assertEqual(os.getcwd() + "/testhome/", identifyhome.identify_home())
|
||||
|
||||
unittest.main()
|
Loading…
Reference in New Issue
Block a user