Exemplo n.º 1
0
def test_fuck_off_empty_args(update, context):
    with patch.object(update.message, "reply_text") as m:
        context.args = []
        fuck_off.cmd_faas(update, context)
        m.assert_called_with("Use: /f**k <who> - To send someone f**k off")
Exemplo n.º 2
0
def test_cmd_fuck_off_username(update, context):
    with patch.object(update.message, "reply_text") as m:
        context.args = ["@rondi"]
        fuck_off.cmd_faas(update, context)
        m.assert_called_with("http://foaas.com/off/@rondi/Alan")
Exemplo n.º 3
0
def test_cmd_fuck_off_multi_args(update, context):
    with patch.object(update.message, "reply_text") as m:
        context.args = ["the", "rules"]
        fuck_off.cmd_faas(update, context)
        m.assert_called_with("http://foaas.com/off/the%20rules/Alan")
Exemplo n.º 4
0
def test_cmd_fuck_off_normal_arg(bot, update):
    with patch.object(update.message, "reply_text") as m:
        fuck_off.cmd_faas(bot, update, args=["Rondi"])
        m.assert_called_with("http://foaas.com/off/Rondi/Alan")