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

All Samples(28)  |  Call(26)  |  Derive(0)  |  Import(2)

src/p/y/pylehash-HEAD/pylehash/tests/test_pylehash.py   pylehash(Download)
    def setUp(self):
        self.s = Switch(ipp=selfipp)
 
    def test_switch_send_writes_to_transport_iff_the_telex_is_not_empty(self):
        s = Switch()

src/p/y/pylehash-HEAD/pylehash/tests/test_pylehash.py   pylehash(Download)
 
from test_stuff import TestCase, selfipp, closeipp, closeipp2, closeipp3, mediumipp, faripp
from pylehash import hash, Telex, Switch, End, handlers, ippstr, EndManager, switch
 
class TestHash(TestCase):
    def test_switch_start_protocol_sends_bootstrap_telex_under_correct_conditions(self):
        s_should_send = Switch(seed_ipp=faripp)
        s_should_send.send = Mock()
        s_should_send.startProtocol()
        assert s_should_send.send.called
        s_should_not_send = Switch()
    def test_switch_add_start_callback_adds_start_callback(self):
        s = Switch(ipp=selfipp)
        s.add_startup_callback(self.one_callback)
        assert self.one_callback in s.startup_callbacks
 
    def test_switch_start_protocol_calls_startup_callbacks(self):
        s = Switch(ipp=selfipp)