58 lines
1.2 KiB
Python
58 lines
1.2 KiB
Python
#!/usr/bin/env python3
|
|
from colorama import Fore, Style
|
|
import os
|
|
import unittest
|
|
import time
|
|
from threading import Thread
|
|
|
|
|
|
def zero(x=""):
|
|
return 0
|
|
input = zero
|
|
import hlna
|
|
|
|
"---------------import подменяем через unittest.mock -----------------------"
|
|
|
|
"---------------------------------------------------------------------------"
|
|
|
|
def config():
|
|
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)
|
|
else:
|
|
print(Fore.RED + "Servers Fail" + Style.RESET_ALL)
|
|
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))
|
|
def test_servers(self):
|
|
pass
|
|
def test_enablemap(self):
|
|
passs
|
|
def test_start(self):
|
|
pass
|
|
def test_delete(self):
|
|
pass
|
|
def test_rcon(self):
|
|
pass
|
|
|
|
|
|
if __name__ == "__main__":
|
|
#unittest.main()
|
|
#servers()
|
|
config()
|
|
delete()
|
|
|
|
|
|
#print(f"{Fore.GREEN} + {text}")
|
|
#print(Fore.YELLOW + "-"*30 + Style.RESET_ALL)
|
|
|