2012-09-23 23:21:48 +00:00
|
|
|
from netlib import utils
|
2014-06-25 18:31:10 +00:00
|
|
|
import socket
|
2012-09-23 23:21:48 +00:00
|
|
|
|
|
|
|
def test_hexdump():
|
|
|
|
assert utils.hexdump("one\0"*10)
|
|
|
|
|
|
|
|
|
|
|
|
def test_cleanBin():
|
|
|
|
assert utils.cleanBin("one") == "one"
|
|
|
|
assert utils.cleanBin("\00ne") == ".ne"
|
|
|
|
assert utils.cleanBin("\nne") == "\nne"
|
|
|
|
assert utils.cleanBin("\nne", True) == ".ne"
|