示例#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"
示例#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!"
示例#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"
示例#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"