Ejemplo n.º 1
0
def test_person_search(person_keys):
    """Tests an API call to get a Persons info from access control terminal"""

    person_instance = api.Person()
    response = person_instance.search("4")

    assert isinstance(response, SimpleNamespace)
    assert response.UserInfoSearch.UserInfo[
        0].employeeNo == '4', "This ID should be in response"
Ejemplo n.º 2
0
def test_person_count():
    person_instance = api.Person()
    response = person_instance.get_count()
    assert isinstance(response, int)
    assert response >= 0, "Count should be 0 or greater!"
Ejemplo n.º 3
0
def test_person_delete():
    person_instance = api.Person()
    response = person_instance.delete(8)
    assert isinstance(response, SimpleNamespace)
    assert response.statusString == 'OK', "Successful response should be OK"
Ejemplo n.º 4
0
def test_person_update():
    person_instance = api.Person()
    response = person_instance.update(8, 'testid888888', 'normal', '12345',
                                      'female')
    assert isinstance(response, SimpleNamespace)
    assert response.statusString == 'OK', "Successful response should be OK"