-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement common
Healthcheck
& Prefix
attributes as abstract prop…
…erties, removing `__init__` from base classes (#20)
- Loading branch information
Showing
6 changed files
with
41 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,8 @@ | ||
from ipaddress import IPv4Network, IPv6Network | ||
|
||
import pytest | ||
|
||
from tests.dummy import DummyPrefix | ||
|
||
|
||
def test__init___non_network_raises_type_error(): | ||
"""Passing a non network prefix raises a TypeError.""" | ||
with pytest.raises(TypeError): | ||
DummyPrefix("2001:db8::/32") # type: ignore | ||
|
||
|
||
def test__init__ip_network(example_networks: IPv4Network | IPv6Network): | ||
"""IPv4Network and IPv6Network prefixes are accepted.""" | ||
DummyPrefix(example_networks) |