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

All Samples(34)  |  Call(34)  |  Derive(0)  |  Import(0)

src/p/o/portfoliyo-HEAD/portfoliyo/view/sms.py   portfoliyo(Download)
 
    with xact.xact():
        reply = hook.receive_sms(source, to, body)
 
    response = twiml.Response()

src/p/o/portfoliyo-HEAD/portfoliyo/tests/sms/test_hook.py   portfoliyo(Download)
 
    with mock.patch('portfoliyo.sms.hook.model.Post.create') as mock_create:
        reply = hook.receive_sms(phone, settings.DEFAULT_NUMBER, 'foo')
 
    assert reply is None
 
    with mock.patch('portfoliyo.sms.hook.model.Post.create') as mock_create:
        reply = hook.receive_sms(phone, settings.DEFAULT_NUMBER, 'foo')
 
    profile = utils.refresh(profile)
 
    with mock.patch('portfoliyo.sms.hook.model.Post.create') as mock_create:
        reply = hook.receive_sms(phone, settings.DEFAULT_NUMBER, 'stop')
 
    assert not utils.refresh(profile.user).is_active
 
    with mock.patch('portfoliyo.sms.hook.model.Post.create') as mock_create:
        reply = hook.receive_sms(phone, settings.DEFAULT_NUMBER, 'stop')
 
    assert not utils.refresh(profile.user).is_active
def test_unknown_profile(db):
    """Reply if profile is unknown."""
    reply = hook.receive_sms('123', settings.DEFAULT_NUMBER, 'foo')
 
    assert reply == (