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}
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'}