# Path: duct/utils.py
# def wait(msecs):
#     def __init__(self, react, path, **kwargs):
#     def _getEndpoint(self, *_a):
# def reverseNameFromIPAddress(address):
#     def __init__(self):
#     def reverse(self, ip):
#         def _ret(result, ip):
#     def __init__(self, finished):
#     def dataReceived(self, data):
#     def connectionLost(self, *_r):
#     def __init__(self, body):
#     def startProducing(self, consumer):
#     def pauseProducing(self):
#     def stopProducing(self):
#     def __init__(self, deferred, timeout):
#     def outReceived(self, data):
#     def errReceived(self, data):
#     def processEnded(self, reason):
#     def connectionMade(self):
#         def killIfAlive():
# def fork(executable, args=(), env={}, path=None, timeout=3600):
#         def getContext(self, *_a):
#     def __init__(self, timeout=120):
#     def abort_request(self, request):
#     def response(self, request):
#     def request(self, url, method='GET', headers={}, data=None, socket=None,
#                 follow_redirect=False):
#             def timeoutProxy(request):
#             def requestAborted(failure):
#     def getBody(self, url, method='GET', headers={}, data=None, socket=None):
#     def getJson(self, url, method='GET', headers={}, data=None, socket=None):
#     def __init__(self, location='/var/lib/duct/cache'):
#     def _changed(self):
#     def _acquire_cache(self):
#     def _write_cache(self, data):
#     def _persist(self):
#     def _read(self):
#     def _remove_key(self, key):
#     def expire(self, age):
#     def set(self, key, val):
#     def get(self, k):
#     def contains(self, k):
#     def delete(self, k):
# class SocketyAgent(Agent):
# class Timeout(Exception):
# class Resolver(object):
# class BodyReceiver(protocol.Protocol):
# class StringProducer(object):
# class ProcessProtocol(protocol.ProcessProtocol):
#     class WebClientContextFactory(ClientContextFactory):
# class HTTPRequest(object):
# class PersistentCache(object):
#     SSL = True
#     SSL = False


from twisted.trial import unittest
from twisted.internet import defer, reactor, error
from duct import utils



class Tests(unittest.TestCase):
    def test_persistent_cache(self):
        pc = utils.PersistentCache(location='test.cache')

        pc.set('foo', 'bar')
        pc.set('bar', 'baz')


# Path: duct/utils.py
# def wait(msecs):
#     def __init__(self, react, path, **kwargs):
#     def _getEndpoint(self, *_a):
# def reverseNameFromIPAddress(address):
#     def __init__(self):
#     def reverse(self, ip):
#         def _ret(result, ip):
#     def __init__(self, finished):
#     def dataReceived(self, data):
#     def connectionLost(self, *_r):
#     def __init__(self, body):
#     def startProducing(self, consumer):
#     def pauseProducing(self):
#     def stopProducing(self):
#     def __init__(self, deferred, timeout):
#     def outReceived(self, data):
#     def errReceived(self, data):
#     def processEnded(self, reason):
#     def connectionMade(self):
#         def killIfAlive():
# def fork(executable, args=(), env={}, path=None, timeout=3600):
#         def getContext(self, *_a):
#     def __init__(self, timeout=120):
#     def abort_request(self, request):
#     def response(self, request):
#     def request(self, url, method='GET', headers={}, data=None, socket=None,
#                 follow_redirect=False):
#             def timeoutProxy(request):
#             def requestAborted(failure):
#     def getBody(self, url, method='GET', headers={}, data=None, socket=None):
#     def getJson(self, url, method='GET', headers={}, data=None, socket=None):
#     def __init__(self, location='/var/lib/duct/cache'):
#     def _changed(self):
#     def _acquire_cache(self):
#     def _write_cache(self, data):
#     def _persist(self):
#     def _read(self):
#     def _remove_key(self, key):
#     def expire(self, age):
#     def set(self, key, val):
#     def get(self, k):
#     def contains(self, k):
#     def delete(self, k):
# class SocketyAgent(Agent):
# class Timeout(Exception):
# class Resolver(object):
# class BodyReceiver(protocol.Protocol):
# class StringProducer(object):
# class ProcessProtocol(protocol.ProcessProtocol):
#     class WebClientContextFactory(ClientContextFactory):
# class HTTPRequest(object):
# class PersistentCache(object):
#     SSL = True
#     SSL = False


# Path: duct/tests/test_utils.py
from twisted.trial import unittest
from twisted.internet import defer, reactor, error
from duct import utils




class Tests(unittest.TestCase):
    def test_persistent_cache(self):
        pc = utils.PersistentCache(location='test.cache')

        pc.set('foo', 'bar')
        pc.set('bar', 'baz')


        pc2 = utils.PersistentCache(location='test.cache')