Ejemplo n.º 1
0
def test_custom_push_cmd(*_):
    with patch(
            "builtins.open",
            mock_open(
                read_data='{"push":{"cmd":"hand","help":"me","allow_all":true}}'
            ),
    ):
        cmds = utils.get_cmds_from_files()
    assert cmds["push"] == {"cmd": "hand", "help": "me", "allow_all": True}
Ejemplo n.º 2
0
def test_custom_push_cmd(*_):
    with patch('builtins.open',
               mock_open(read_data='push:\n  cmd: hand\n  help: me')):
        cmds = utils.get_cmds_from_files()
    assert cmds['push'] == {'cmd': 'hand', 'help': 'me'}