51 lines
1.1 KiB
Python
51 lines
1.1 KiB
Python
#!/usr/bin/env python3
|
|
from colorama import Fore, Style
|
|
import os
|
|
import unittest
|
|
import time
|
|
from threading import Thread
|
|
|
|
import hlna
|
|
|
|
"---------------import подменяем через unittest.mock -----------------------"
|
|
|
|
"---------------------------------------------------------------------------"
|
|
|
|
def config():
|
|
x = os.system("./hlna.py config < 1")
|
|
print("x=", x)
|
|
def servers():
|
|
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 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)
|
|
|