daemon: removed utils.validate_ip and shifted tests to test_nodes

This commit is contained in:
Blake Harnden 2020-06-19 15:32:17 -07:00
parent 1829a8e2f8
commit 0d4a360e89
3 changed files with 14 additions and 35 deletions

View file

@ -25,24 +25,6 @@ class TestUtils:
assert len(two_args) == 2
assert len(unicode_args) == 3
@pytest.mark.parametrize(
"data,expected",
[
("127", "127.0.0.0/32"),
("10.0.0.1/24", "10.0.0.1/24"),
("2001::", "2001::/128"),
("2001::/64", "2001::/64"),
],
)
def test_validate_ip(self, data: str, expected: str):
value = utils.validate_ip(data)
assert value == expected
@pytest.mark.parametrize("data", ["256", "1270.0.0.1", "127.0.0.0.1"])
def test_validate_ip_exception(self, data: str):
with pytest.raises(CoreError):
utils.validate_ip("")
@pytest.mark.parametrize(
"data,expected",
[