Finishing test documentation for queue methods.

replay_error
Pedro de Oliveira Guedes 2022-01-19 09:30:39 -03:00
parent 4045de0753
commit 9889c11eb7
2 changed files with 37 additions and 2 deletions

View File

@ -27,3 +27,15 @@ Feature: The Replay API client
# Given the fact that the methods "service_stop_all" and "exit" will break the tests chain, they cannot be tested.
# The same from above goes for the "exit" method.
# The queue methods needs some parameters, wich cannot be given, since this test is not made to be launched through Replay and there is no way to know wich are the "job_id"s or "queue_id"s from the tester machine.
Scenario: Testing queue_abort method
Given the Replay client
When the queue_abort method is called
Then there must be None as return, since this test was not runned by Replay

View File

@ -54,3 +54,26 @@ def step_impl(context):
@then(u'there must be a list as a return')
def step_impl(context):
assert type(context.all_menus_return) == type([]), "Something went wrong getting the enabled menus."
# Given the fact that the methods "service_stop_all" and "exit" will break the tests chain, they cannot be tested.
# The same from above goes for the "exit" method.
# The queue methods needs some parameters, wich cannot be given, since this test is not made to be launched through Replay and there is no way to know wich are the "job_id"s or "queue_id"s from the tester machine.
# ============================= QUEUE ABORT =============================
@when(u'the queue_abort method is called')
def step_impl(context):
context.queue_abort_return = context.client.queue_abort()
@then(u'there must be None as return, since this test was not runned by Replay')
def step_impl(context):
assert (context.queue_abort_return == None), 'Something went wrong with queue_abort.'