Esempio n. 1
0
def test_interview_comment(session, params):
    with raises(TypeError):
        InterviewsApi(session).comment(params['InterviewId'], comment="aaa")

    # no way to check comments for now, make sure there are no exceptions
    InterviewsApi(session).comment(params['InterviewId'],
                                   comment="aaa",
                                   variable="Q01")
Esempio n. 2
0
def test_interview_assign(session, params):
    with raises(NotAcceptableError):
        InterviewsApi(session).assign(params['InterviewId'],
                                      '00000000-0000-0000-0000-000000000000')
Esempio n. 3
0
def test_interview_hqunapprove(session, params):
    with raises(NotAcceptableError):
        assert InterviewsApi(session).hqunapprove(params['InterviewId'])
Esempio n. 4
0
def test_interview_reject(session, params):
    with raises(NotAcceptableError):
        assert InterviewsApi(session).reject(params['InterviewId'])
Esempio n. 5
0
def test_interview_history(session, params):
    """Tests an API call to get an interview history"""

    r = InterviewsApi(session).history(params['InterviewId'])
    assert 'InterviewId' in r.keys(
    ), "The Questions key should be in the response"
Esempio n. 6
0
def test_interview_details(session, params):
    """Tests an API call to get an interview details"""

    r = InterviewsApi(session).get_info(params['InterviewId'])
    assert r.get_answer("Q01") == "Yes"
Esempio n. 7
0
def test_interview_list(session, params):
    r = InterviewsApi(session).get_list(
        questionnaire_id=to_hex(params['TemplateId']))
    assert isinstance(r, types.GeneratorType)
    assert isinstance(next(r),
                      Interview), "There should be a list of Interview objects"