# Path: vcontrol/rest/machines/shutdown.py
# class ShutdownMachineR:
#     """
#     This endpoint is for shutting down a running machine.
#     """
#     allow_origin, rest_url = get_allowed.get_allowed()
# 
#     def GET(self, machine):
#         try:
#             web.header('Access-Control-Allow-Origin', self.allow_origin)
#         except Exception as e: # no pragma
#             print(e.message)
#         try:
#             out = subprocess.check_output("/usr/local/bin/docker-machine stop "+machine, shell=True)
#         except:
#             out = "unable to stop machine"
#         return str(out)


from vcontrol.rest.machines.shutdown import ShutdownMachineR
UNSUCCESSFUL_SHUTDOWN_MESSAGE = "unable to stop machine"

def test_create_machine_shutdown():
    """ tests the ShutdownMachineR class for proper shutting down"""
    test_machine = 'foo'

# Path: vcontrol/rest/machines/shutdown.py
# class ShutdownMachineR:
#     """
#     This endpoint is for shutting down a running machine.
#     """
#     allow_origin, rest_url = get_allowed.get_allowed()
# 
#     def GET(self, machine):
#         try:
#             web.header('Access-Control-Allow-Origin', self.allow_origin)
#         except Exception as e: # no pragma
#             print(e.message)
#         try:
#             out = subprocess.check_output("/usr/local/bin/docker-machine stop "+machine, shell=True)
#         except:
#             out = "unable to stop machine"
#         return str(out)


# Path: tests/test_shutdown.py
from vcontrol.rest.machines.shutdown import ShutdownMachineR

UNSUCCESSFUL_SHUTDOWN_MESSAGE = "unable to stop machine"

def test_create_machine_shutdown():
    """ tests the ShutdownMachineR class for proper shutting down"""
    test_machine = 'foo'

    shutdown_machine_r = ShutdownMachineR()