# Path: ngcccbase/p2ptrade/utils.py
# def make_random_id():
#     bits = os.urandom(8)
#     return binascii.hexlify(bits)


import re
import unittest
from ngcccbase.p2ptrade.utils import make_random_id
#!/usr/bin/env python



class TestMakeRandomId(unittest.TestCase):

  def test_is_random(self):
    self.assertTrue(make_random_id() != make_random_id())

  def test_at_least_8_bytes_of_entropy(self):
    self.assertTrue(len(make_random_id()) >= 16)

  def test_is_hex_str(self):
    is_hex = lambda x: bool(re.match("[0123456789abcdef]*", x))
    self.assertTrue(is_hex(make_random_id()))


class TestHTTPInterface(unittest.TestCase):


# Path: ngcccbase/p2ptrade/utils.py
# def make_random_id():
#     bits = os.urandom(8)
#     return binascii.hexlify(bits)


# Path: ngcccbase/p2ptrade/tests/test_utils.py
import re
import unittest
from ngcccbase.p2ptrade.utils import make_random_id

#!/usr/bin/env python



class TestMakeRandomId(unittest.TestCase):

  def test_is_random(self):
    self.assertTrue(make_random_id() != make_random_id())

  def test_at_least_8_bytes_of_entropy(self):
    self.assertTrue(len(make_random_id()) >= 16)

  def test_is_hex_str(self):
    is_hex = lambda x: bool(re.match("[0123456789abcdef]*", x))
    self.assertTrue(is_hex(make_random_id()))


class TestHTTPInterface(unittest.TestCase):


  def test_poll(self):