Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(10)  |  Call(0)  |  Derive(6)  |  Import(4)

src/p/e/petmail-HEAD/petmail/test/test_transport.py   petmail(Download)
import json
from twisted.trial import unittest
from nacl.public import PrivateKey, PublicKey, Box
from .common import TwoNodeMixin
from ..mailbox import channel
from ..mailbox.delivery import createMsgA, ReturnTransport, OutboundHTTPTransport
from ..mailbox.server import parseMsgA, parseMsgB
 
class Transports(TwoNodeMixin, unittest.TestCase):

src/p/e/petmail-HEAD/petmail/test/test_server.py   petmail(Download)
from twisted.web.test.test_web import DummyRequest # not exactly stable
from twisted.internet import defer
from .common import TwoNodeMixin
from .. import rrid, eventsource
from ..database import Notice
from ..eventual import flushEventualQueue
from ..mailbox import delivery, retrieval
from .test_eventsource import parse_events
 
class Inbound(TwoNodeMixin, unittest.TestCase):
class Retrieval(TwoNodeMixin, unittest.TestCase):
    def test_resource(self):
        n = self.make_nodes(transport="local")[1]
        ms = n.mailbox_server
        tid1, trec1 = self.add_recipient(n)

src/p/e/petmail-HEAD/petmail/test/test_retrieval.py   petmail(Download)
from ..eventual import flushEventualQueue
from ..mailbox import server, retrieval
from .common import flip_bit, TwoNodeMixin
 
class Roundtrip(unittest.TestCase):
class Server(TwoNodeMixin, unittest.TestCase):
 
    def test_retrieval_client(self):
        n = self.make_nodes(transport="local")[1]
        ms = n.mailbox_server

src/p/e/petmail-HEAD/petmail/test/test_channel.py   petmail(Download)
import json
from twisted.trial import unittest
from hashlib import sha256
from nacl.public import PrivateKey, PublicKey, Box
from .common import TwoNodeMixin
from ..mailbox import channel
from ..mailbox.server import parseMsgA, parseMsgB
 
class msgC(TwoNodeMixin, unittest.TestCase):
class Send(TwoNodeMixin, unittest.TestCase):
    def test_send(self):
        nA, nB, entA, entB = self.make_connected_nodes()
        d = nA.agent.send_message(entA["id"], {"hi": "world"})
        def _sent(res):