import textwrap, re, json from libmproxy import utils from nose.tools import assert_raises 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("