DEFAULT_REQUEST_HEADERS = {
    "Content-type": "application/json",
    "Accept": ["application/json"]
}


def test_get_equipment_location(client_with_mocked_data):
    rv = client_with_mocked_data.get(
        '/opsdb/equipment-location',
        headers=DEFAULT_REQUEST_HEADERS)
    assert rv.status_code == 200
    assert rv.is_json
    # TODO: validate against schema


def test_get_interface_info(client_with_mocked_data):
    rv = client_with_mocked_data.get(
        '/opsdb/interfaces',
        headers=DEFAULT_REQUEST_HEADERS)
    assert rv.status_code == 200
    assert rv.is_json
    # TODO: validate against schema


def test_get_interface_info_for_equipment(client_with_mocked_data):
    rv = client_with_mocked_data.get(
        '/opsdb/interfaces/mx1.ams.nl.geant.net',
        headers=DEFAULT_REQUEST_HEADERS)
    assert rv.status_code == 200
    assert rv.is_json
    # TODO: validate against schema


def test_get_interface_info_for_equipment_and_interface(
            client_with_mocked_data):
    rv = client_with_mocked_data.get(
        '/opsdb/interfaces/mx1.ams.nl.geant.net/ae0.0',
        headers=DEFAULT_REQUEST_HEADERS)
    assert rv.status_code == 200
    assert rv.is_json
    # TODO: validate against schema


def test_get_children(client_with_mocked_data):
    rv = client_with_mocked_data.get(
        '/opsdb/circuit-hierarchy/children/12363',
        headers=DEFAULT_REQUEST_HEADERS)
    assert rv.status_code == 200
    assert rv.is_json
    # TODO: validate against schema


def test_get_parents(client_with_mocked_data):
    rv = client_with_mocked_data.get(
        '/opsdb/circuit-hierarchy/parents/11725',
        headers=DEFAULT_REQUEST_HEADERS)
    assert rv.status_code == 200
    assert rv.is_json
    # TODO: validate against schema