Поправил создание уникальных конфигов
This commit is contained in:
13
pytest.py
13
pytest.py
@ -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()
|
||||
|
||||
|
Reference in New Issue
Block a user