ó @r`Pc@`sVdZddlmZmZddlmZddlmZdefd„ƒYZdS(s& Tests for L{twisted.python.context}. i(tdivisiontabsolute_import(tSynchronousTestCase(tcontextt ContextTestcB`s2eZdZd„Zd„Zd„Zd„ZRS(sH Tests for the module-scope APIs for L{twisted.python.context}. cC`s|jtjdƒdƒdS(st Arbitrary keys which have not been set in the context have an associated value of C{None}. txN(t assertEqualRtgettNone(tself((s=/usr/lib/python2.7/dist-packages/twisted/test/test_context.pyttest_notPresentIfNotSetscC`s-|jtjidd6tjdƒdƒdS(s• Values may be associated with keys by passing them in a dictionary as the first argument to L{twisted.python.context.call}. tyRN(RRtcallR(R ((s=/usr/lib/python2.7/dist-packages/twisted/test/test_context.pyttest_setByCallscC`s7tjidd6d„ƒ|jtjdƒdƒdS(sŸ After a L{twisted.python.context.call} completes, keys specified in the call are no longer associated with the values from that call. R RcS`sdS(N(R(((s=/usr/lib/python2.7/dist-packages/twisted/test/test_context.pyt'sN(RR RRR(R ((s=/usr/lib/python2.7/dist-packages/twisted/test/test_context.pyttest_unsetAfterCall"scC`sOtƒ}|jtjj|dƒtj|dƒ|jdtj|ƒƒdS(sy A default value may be set for a key in the context using L{twisted.python.context.setDefault}. R N( tobjectt addCleanupRtdefaultContextDicttpopRt setDefaultRR(R tkey((s=/usr/lib/python2.7/dist-packages/twisted/test/test_context.pyttest_setDefault+s (t__name__t __module__t__doc__R R RR(((s=/usr/lib/python2.7/dist-packages/twisted/test/test_context.pyRs    N( Rt __future__RRttwisted.trial.unittestRttwisted.pythonRR(((s=/usr/lib/python2.7/dist-packages/twisted/test/test_context.pyts