From 938e1bddd3622bc8742983402873e15eb31b709b Mon Sep 17 00:00:00 2001 From: Kevin Froman Date: Wed, 5 Feb 2020 01:53:14 -0600 Subject: [PATCH] Added site list command test --- tests/test_commands_basic.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/test_commands_basic.py b/tests/test_commands_basic.py index 931c7925..0bad6830 100644 --- a/tests/test_commands_basic.py +++ b/tests/test_commands_basic.py @@ -6,7 +6,10 @@ 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 +from utils import createdirs from onionrcommands import parser +import onionrsetup as setup +from netcontroller.torcontrol import customtorrc class OnionrTests(unittest.TestCase): def test_no_command(self): testargs = ["onionr.py"] @@ -17,6 +20,8 @@ class OnionrTests(unittest.TestCase): with patch.object(sys, 'argv', testargs): parser.register() def test_site_list(self): + createdirs.create_dirs() + setup.setup_config() testargs = ["onionr.py", "list-sites"] with patch.object(sys, 'argv', testargs): parser.register()