Поправил создание уникальных конфигов

This commit is contained in:
sitisll
2023-02-28 12:02:00 +03:00
parent 8589fb0964
commit 03da3ffa1c
2 changed files with 42 additions and 17 deletions

View File

@ -5,6 +5,10 @@ import unittest
import time
from threading import Thread
def zero(x=""):
return 0
input = zero
import hlna
"---------------import подменяем через unittest.mock -----------------------"
@ -12,9 +16,10 @@ import hlna
"---------------------------------------------------------------------------"
def config():
x = os.system("./hlna.py config < 1")
print("x=", x)
hlna.config()
def servers():
x = input()
print('x=',x)
x = os.system("./hlna.py servers")
if x == 0:
print("Servers - "+Fore.GREEN + "OK" + Style.RESET_ALL)
@ -23,6 +28,8 @@ def servers():
def delete():
print("Delete - " + Fore.RED + "False" + Style.RESET_ALL)
class TestHlna(unittest.TestCase):
def setUp(self):
self.p1
def test_config(self):
pass
# self.assert _input(hlna.config(input(1), 11))
@ -40,7 +47,7 @@ class TestHlna(unittest.TestCase):
if __name__ == "__main__":
#unittest.main()
servers()
#servers()
config()
delete()