HEX
Server: Apache/2.4.46 (Win64) OpenSSL/1.1.1j PHP/8.4.25
System: Windows NT DESKTOP-4TAV2RJ 10.0 build 19045 (Windows 10) AMD64
User: fred (0)
PHP: 8.4.25
Disabled: NONE
Upload Files
File: C:/Users/fred/anaconda3/Lib/site-packages/panel/tests/models/test_location.py
from panel.models.location import Location


def test_constructor():
    # When
    actual = Location()
    # Then
    assert actual.href == ""
    assert actual.hostname == ""
    assert actual.pathname == ""
    assert actual.protocol == ""
    assert actual.port == ""
    assert actual.search == ""
    assert actual.hash == ""
    assert actual.reload == True


def test_constructor_with__href():
    # Given
    href = "https://panel.holoviz.org:443/how_to/layout/spacing.html?color=blue#margin-parameter"
    # When
    actual = Location(
        href="https://panel.holoviz.org:443/how_to/layout/spacing.html?color=blue#margin-parameter"
    )
    # Then
    assert actual.href == href
    assert actual.hostname == ""
    assert actual.pathname == ""
    assert actual.protocol == ""
    assert actual.port == ""
    assert actual.search == ""
    assert actual.hash == ""
    assert actual.reload == True