import pytest

from imecilabt_utils.validation_utils import is_valid_url


def test_is_invalid_url_1():
    assert not is_valid_url('')


def test_is_invalid_url_2():
    assert not is_valid_url('http')


def test_is_invalid_url_3():
    assert not is_valid_url('http://')


def test_is_invalid_url_4():
    assert not is_valid_url('bad://example.com')


def test_is_invalid_url_5():
    assert not is_valid_url('https://bad$.example.com')


def test_is_invalid_url_6():
    assert not is_valid_url('example.com')


def test_is_invalid_url_7():
    assert not is_valid_url('https://example.com:0')


def test_is_invalid_url_8():
    assert not is_valid_url('https://example.com:65536')


def test_is_invalid_url_9():
    assert not is_valid_url('https://example.com:-1')


def test_is_invalid_url_10():
    assert not is_valid_url('https://example.com:None')


def test_is_valid_url_1():
    assert is_valid_url('https://example.com')


def test_is_valid_url_2():
    assert is_valid_url('https://example.com:80')


def test_is_valid_url_3():
    assert is_valid_url('https://example.com:80/')


def test_is_valid_url_4():
    assert is_valid_url('https://example.com/')


def test_is_valid_url_6():
    assert is_valid_url('https://example.com/some/path/file.ext')


def test_is_valid_url_7():
    assert is_valid_url('https://example.com:443/some/path/file.ext')


def test_is_valid_url_8():
    assert is_valid_url('https://127.0.0.1')


def test_is_valid_url_9():
    assert is_valid_url('https://127.0.0.1:12345')


def test_is_valid_url_10():
    assert is_valid_url('https://127.0.0.1:443/some/path/file.ext')
