# Path: react/utils.py
# def set_up():
# def load_libs(scripts_paths):
# def run_script(script):


    from unittest.mock import patch
    from mock import patch
from contextlib import contextmanager
from react import utils
import unittest
import logging
import os
import tempfile
import six
import react
def js_file(data):
    if isinstance(data, six.text_type):
        data = data.encode('utf-8')

    temp = tempfile.NamedTemporaryFile(delete=False)
    temp.write(data)
    temp.close()

    try:
        yield temp.name
    finally:
        os.remove(temp.name)


class UtilsTest(unittest.TestCase):

    def setUp(self):
        pass

    def tearDown(self):
        pass

    def test_set_up(self):
        """
        It should call shortcut.setup
        """
        # set_up has been called for the test suite
        # (see runtests) so there is not much that
        # can be tested
        with patch('react.utils.shortcuts.set_up', autospec=True) as s:

# Path: react/utils.py
# def set_up():
# def load_libs(scripts_paths):
# def run_script(script):


# Path: tests/tests_utils.py
    from unittest.mock import patch
    from mock import patch
from contextlib import contextmanager
from react import utils
import unittest
import logging
import os
import tempfile
import six
import react

def js_file(data):
    if isinstance(data, six.text_type):
        data = data.encode('utf-8')

    temp = tempfile.NamedTemporaryFile(delete=False)
    temp.write(data)
    temp.close()

    try:
        yield temp.name
    finally:
        os.remove(temp.name)


class UtilsTest(unittest.TestCase):

    def setUp(self):
        pass

    def tearDown(self):
        pass

    def test_set_up(self):
        """
        It should call shortcut.setup
        """
        # set_up has been called for the test suite
        # (see runtests) so there is not much that
        # can be tested
        with patch('react.utils.shortcuts.set_up', autospec=True) as s:

            utils.set_up()