def METHOD_NAME(self):
    # Test that token_* functions handle default size correctly.
    for func in (secrets.token_bytes, secrets.token_hex,
                 secrets.token_urlsafe):
        with self.subTest(func=func):
            name = func.__name__
            try:
                func()
            except TypeError:
                self.fail("%s cannot be called with no argument" % name)
            try:
                func(None)
            except TypeError:
                self.fail("%s cannot be called with None" % name)
    size = secrets.DEFAULT_ENTROPY
    self.assertEqual(len(secrets.token_bytes(None)), size)
    self.assertEqual(len(secrets.token_hex(None)), 2*size)