예제 #1
0
def test_class():
    url = "class/?class_name=Transport/VlanPort"
    response = client.get(url)
    for l in response.json():
        if l["attribute"] == ["egressQosClassification"]:
            assert l["attribute"]["egressQosClassification"] == "moRef"
            assert l["attribute"]["egressQosClassification"] == "moRef"
예제 #2
0
def test_user_group_access() -> None:
    r = client.get(f"{API_URL}{settings.API_USER_PREFIX}/whoami")
    assert r.status_code == 200
예제 #3
0
def test_random():
    url = "random/?type=all-meat&sentences=3"
    response = client.get(url)
    assert response.status_code == 200
    assert len(response.json()['text'].split(".")) == 4
예제 #4
0
def test_datatype():
    url = "datatype/?datatype=int32"
    response = client.get(url)
    assert "x2retryTimerMaxAuto" in response.json()['attributes']
예제 #5
0
def test_attribute():
    url = "attribute/?attribute_name=egressQosClassification"
    response = client.get(url)
    assert response.json()['datatype'] == "moRef"