import json from libmproxy import utils import tutils utils.CERT_SLEEP_TIME = 0 def test_format_timestamp(): assert utils.format_timestamp(utils.timestamp()) def test_isBin(): assert not utils.isBin("testing\n\r") assert utils.isBin("testing\x01") assert utils.isBin("testing\x0e") assert utils.isBin("testing\x7f") def test_isXml(): assert not utils.isXML("foo") assert utils.isXML("