This file contains hidden or 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 hidden or 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 hidden or 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
for payload_type, message in payload_type_to_message.items():
assert payload_type == message.payload_type
def test_invalid_ip():
with pytest.raises(
ValueError, match=r"does not appear to be an IPv4 or IPv6 address"
):
sut = DoIPClient(test_ip + "a", test_logical_address)
def test_ipv4(mock_socket):
sut = DoIPClient(test_ip, test_logical_address)
assert mock_socket._network == socket.AF_INET
assert mock_socket.opts == {
socket.SOL_SOCKET: {socket.SO_REUSEADDR: True},
socket.IPPROTO_TCP: {socket.TCP_NODELAY: True},
}
def test_ipv6(mock_socket):
sut = DoIPClient("2001:db8::", test_logical_address)
assert mock_socket._network == socket.AF_INET6
assert mock_socket.opts == {
socket.SOL_SOCKET: {socket.SO_REUSEADDR: True},
socket.IPPROTO_TCP: {socket.TCP_NODELAY: True},
}
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
IPv6 Support #9
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uh oh!
There was an error while loading. Please reload this page.
IPv6 Support #9
Filter by extension
Only manifest files
Viewed files
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
There are no files selected for viewing