@when('I make an API call to create questions API with missing username in request')
def step_impl(context):
    data = {'title': 'Are you under 20?', 'choices': [{'description': 'Yes', 'value': '1'}, {'description': 'No', 'value': '-1'}]}
    resp = requests.post((context.test.live_server_url + '/host/events/create/'), data)
    assert ((resp.status_code >= 400) and (resp.status_code < 500))
    context.api_response_data = resp.json()
@when('I make an API call to create questions API with missing username in request')
def step_impl(context):
    data = {'title': 'Are you under 20?', 'choices': [{'description': 'Yes', 'value': '1'}, {'description': 'No', 'value': '-1'}]}
    resp = requests.post((context.test.live_server_url + '/host/events/create/'), data)
    assert ((resp.status_code >= 400) and (resp.status_code < 500))
    context.api_response_data = resp.json()