techservicesillinois / clearpass-api

Client for Aruba Clearpass
Other
0 stars 0 forks source link

Add unit tests from SecOps-Tools #1

Closed tzturner closed 3 months ago

tzturner commented 4 months ago

We believe the unit tests currently residing in SecOps-Tools (may) actually belong in this repo.

from clearpass.client import build_url

def test_build_url_baseurl():
    url = build_url(baseurl='example.com')
    assert url == 'https://example.com/'

def test_build_url_section_url():
    section = {
        'endpoint': 'example.com',
    }
    url = build_url(section_url=section['endpoint'])
    assert url == 'https://example.com/'
edthedev commented 3 months ago

build_url no longer exists in the refactored version.