Skip to content

Commit

Permalink
Rename adresses in addresses
Browse files Browse the repository at this point in the history
  • Loading branch information
vguillard authored and philpep committed Jul 4, 2021
1 parent 5a86a34 commit 05df015
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion test/test_modules.py
Original file line number Diff line number Diff line change
Expand Up @@ -687,7 +687,7 @@ def test_interface(host, family):
# exist
assert host.interface("eth0", family=family).exists
assert not host.interface("does_not_exist", family=family).exists
# adresses
# addresses
addresses = host.interface.default(family).addresses
assert len(addresses) > 0
for add in addresses:
Expand Down
2 changes: 1 addition & 1 deletion testinfra/modules/interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class Interface(Module):
Optionally, the protocol family to use can be enforced.
>>> host.interface("eth0", "inet6").adresses
>>> host.interface("eth0", "inet6").addresses
['fe80::e291:f5ff:fe98:6b8c']
"""

Expand Down
6 changes: 3 additions & 3 deletions testinfra/modules/socket.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ def is_listening(self):
>>> host.socket("unix:///var/run/docker.sock").is_listening
False
>>> # This HTTP server listen on all ipv4 adresses but not on ipv6
>>> # This HTTP server listen on all ipv4 addresses but not on ipv6
>>> host.socket("tcp://0.0.0.0:80").is_listening
True
>>> host.socket("tcp://:::80").is_listening
Expand Down Expand Up @@ -127,7 +127,7 @@ def is_listening(self):
def clients(self) -> List[Optional[Tuple[str, int]]]:
"""Return a list of clients connected to a listening socket
For tcp and udp sockets a list of pair (adress, port) is returned.
For tcp and udp sockets a list of pair (address, port) is returned.
For unix sockets a list of None is returned (thus you can make a
len() for counting clients).
Expand Down Expand Up @@ -254,7 +254,7 @@ def _iter_sockets(self, listening):
elif protocol in ("tcp", "udp"):
host, port = local.rsplit(":", 1)
port = int(port)
# new versions of ss output ipv6 adresses enclosed in []
# new versions of ss output ipv6 addresses enclosed in []
if host and host[0] == "[" and host[-1] == "]":
host = host[1:-1]
else:
Expand Down

0 comments on commit 05df015

Please sign in to comment.