Skip to content
Snippets Groups Projects
Commit 185573a5 authored by Guillaume Valadon's avatar Guillaume Valadon Committed by GitHub
Browse files

Merge pull request #795 from gpotter2/patch-tests-7

[coverage] reduce randomness of coverage
parents 40978686 10b0db3b
No related branches found
No related tags found
No related merge requests found
......@@ -2,6 +2,19 @@
# More informations at http://www.secdev.org/projects/UTscapy/
############
############
+ Networking tests
= Automaton - SelectableSelector system timeout
class TimeOutSelector(SelectableObject):
def check_recv(self):
return False
assert select_objects([TimeOutSelector()], 0) == []
assert select_objects([TimeOutSelector()], 1) == []
############
############
+ Mocked read_routes6() calls
......
......@@ -272,6 +272,11 @@ def test_hexdiff():
test_hexdiff()
= Test mysummary functions - Ether
Ether(dst="ff:ff:ff:ff:ff:ff", src="ff:ff:ff:ff:ff:ff", type=0x9000)
assert _.mysummary() == 'ff:ff:ff:ff:ff:ff > ff:ff:ff:ff:ff:ff (0x9000)'
= Test fletcher16_* functions
assert(fletcher16_checksum("\x28\x07") == 22319)
assert(fletcher16_checkbytes("ABCDEF", 2) == "\x89\x67")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment