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

All Samples(8)  |  Call(8)  |  Derive(0)  |  Import(0)
Clears out the states for unit testing.

src/l/a/lamson-HEAD/tests/lamson_tests/testing_tests.py   lamson(Download)
def setup():
    Router.clear_routes()
    Router.clear_states()
    Router.load(['lamson_tests.simple_fsm_mod'])
 

src/l/a/lamson-HEAD/tests/lamson_tests/bounce_tests.py   lamson(Download)
 
    msg.bounce.primary_status = (4, u'Persistent Transient Failure')
    Router.clear_states()
    Router.deliver(msg)
    assert Router.in_state(bounce_filtered_mod.START, msg)
    assert bounce_filtered_mod.SOFT_RAN, "Soft bounce didn't actually run."
 
    msg = mail.MailRequest(None, None, None, open("tests/signed.msg").read())
    Router.clear_states()

src/l/a/lamson-HEAD/lamson/testing.py   lamson(Download)
    def begin(self):
        """Clears out the queue and Router states so that you have a fresh start."""
        clear_queue()
        routing.Router.clear_states()
 

src/l/a/lamson-1.3.4/tests/lamson_tests/testing_tests.py   lamson(Download)
def setup():
    Router.clear_routes()
    Router.clear_states()
    Router.load(['lamson_tests.simple_fsm_mod'])
 

src/l/a/lamson-1.3.4/tests/lamson_tests/bounce_tests.py   lamson(Download)
 
    msg.bounce.primary_status = (4, u'Persistent Transient Failure')
    Router.clear_states()
    Router.deliver(msg)
    assert Router.in_state(bounce_filtered_mod.START, msg)
    assert bounce_filtered_mod.SOFT_RAN, "Soft bounce didn't actually run."
 
    msg = mail.MailRequest(None, None, None, open("tests/signed.msg").read())
    Router.clear_states()

src/l/a/lamson-1.3.4/lamson/testing.py   lamson(Download)
    def begin(self):
        """Clears out the queue and Router states so that you have a fresh start."""
        clear_queue()
        routing.Router.clear_states()