Fix committ
This commit is contained in:
parent
755320cb05
commit
cfa38297a7
|
@ -8,6 +8,6 @@ step2:
|
|||
delay: 1
|
||||
name: clear_preview_controller
|
||||
step3:
|
||||
max: 1
|
||||
min: 1
|
||||
name: new_service
|
||||
payload:
|
||||
text: Show some text
|
||||
name: trigger_alert
|
|
@ -0,0 +1,4 @@
|
|||
---
|
||||
process_name: themes
|
||||
step1:
|
||||
name: get theme list
|
|
@ -187,3 +187,12 @@ def controller_item_show(rtc: object, payload: dict) -> None:
|
|||
print_text('Controller_item_show')
|
||||
ret = requests.post(rtc.base_url + 'controller/show', json=dict(id=int(id)))
|
||||
assert ret.status_code == 204, ret.status_code
|
||||
|
||||
|
||||
def trigger_alert(rtc: object, payload: dict) -> None:
|
||||
p_text = payload['text']
|
||||
print_text('Trigger_Alert')
|
||||
ret = requests.post(rtc.base_url + 'plugins/alerts', json=dict(text=p_text))
|
||||
assert ret.status_code == 204, ret.status_code
|
||||
|
||||
##Themes here
|
|
@ -23,24 +23,24 @@ init(autoreset=True)
|
|||
|
||||
|
||||
def print_text(text: str):
|
||||
print(Fore.LIGHTMAGENTA_EX + '[*] = ' + text)
|
||||
print(Fore.LIGHTMAGENTA_EX + f'[*] {text}')
|
||||
|
||||
|
||||
def print_error(text: str):
|
||||
print(Fore.RED + '[-] = ' + text)
|
||||
print(Fore.RED + f'[-] {text}')
|
||||
|
||||
|
||||
def print_ok(text: str):
|
||||
print(Fore.GREEN + '[_] = ' + text)
|
||||
print(Fore.GREEN + f'[_] {text}')
|
||||
|
||||
|
||||
def print_warn(text: str):
|
||||
print(Fore.YELLOW + '[?] = ' + text)
|
||||
print(Fore.YELLOW + f'[?] {text}')
|
||||
|
||||
|
||||
def print_info(text: str):
|
||||
print(Fore.MAGENTA + '[!] = ' + text)
|
||||
print(Fore.MAGENTA + f'[!] {text}')
|
||||
|
||||
|
||||
def print_debug(text: str):
|
||||
print(Fore.CYAN + '[#] = ' + text)
|
||||
print(Fore.CYAN + f'[#] {text}')
|
||||
|
|
|
@ -116,7 +116,8 @@ class RunTestsController(object):
|
|||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument('rargs', nargs='*', default=[])
|
||||
a = parser.parse_args()
|
||||
with open(a.rargs[0], 'r') as file:
|
||||
f_open = f'scripts/{a.rargs[0]}'
|
||||
with open(f_open, 'r') as file:
|
||||
commands = yaml.load(file, Loader=yaml.FullLoader)
|
||||
for step in commands:
|
||||
if step == 'process_name':
|
||||
|
|
|
@ -27,7 +27,7 @@ def start() -> None:
|
|||
Instantiate and run the tests.
|
||||
:return:
|
||||
"""
|
||||
print_text('OpenLP - API Test Runner V0_2')
|
||||
print_text('OpenLP - API Test Runner V0_3')
|
||||
print_text('Check OpenLP is running')
|
||||
op_address, op_http_port = check_for_openlp('http')
|
||||
if not op_http_port:
|
||||
|
|
Loading…
Reference in New Issue