コード例 #1
0
def test_parse_url_lowercase_host():
    """Test we update empty paths."""
    assert indieauth._parse_url('http://ex.com/hello').path == '/hello'
    assert indieauth._parse_url('http://EX.COM/hello').hostname == 'ex.com'

    parts = indieauth._parse_url('http://EX.COM:123/HELLO')
    assert parts.netloc == 'ex.com:123'
    assert parts.path == '/HELLO'
コード例 #2
0
def test_parse_url_lowercase_host():
    """Test we update empty paths."""
    assert indieauth._parse_url("http://ex.com/hello").path == "/hello"
    assert indieauth._parse_url("http://EX.COM/hello").hostname == "ex.com"

    parts = indieauth._parse_url("http://EX.COM:123/HELLO")
    assert parts.netloc == "ex.com:123"
    assert parts.path == "/HELLO"
コード例 #3
0
def test_parse_url_lowercase_host():
    """Test we update empty paths."""
    assert indieauth._parse_url('http://ex.com/hello').path == '/hello'
    assert indieauth._parse_url('http://EX.COM/hello').hostname == 'ex.com'

    parts = indieauth._parse_url('http://EX.COM:123/HELLO')
    assert parts.netloc == 'ex.com:123'
    assert parts.path == '/HELLO'
コード例 #4
0
def test_parse_url_path():
    """Test we update empty paths."""
    assert indieauth._parse_url('http://ex.com').path == '/'
コード例 #5
0
def test_parse_url_path():
    """Test we update empty paths."""
    assert indieauth._parse_url('http://ex.com').path == '/'