import pytest

from unittest import mock
from .faker import *
from tpl.sandbox import py_execute, shell_execute


def test_py_execute():
    command = '{"key":"value"}'
    context = py_execute(command)
    assert isinstance(context, dict)
    assert context.get('key') == 'value'



def test_shell_execute():
    pass
import pytest

from unittest import mock
from .faker import *
from tpl.sandbox import shell_execute


def test_shell_execute():
    command = """echo '{"key":"value"}' >> $pipe"""
    context = shell_execute(command)
    assert isinstance(context, dict)

add test case of shell execute