# Path: achilles/common.py
# class AchillesTransport(object):
#     """
#     Transport object, holds information context for some user requests
#     and response
#     """
#     def __init__(self, request):
#         """
#         Achilles Transport init for Django requests, it gets a request object
#         and fills its fields from it
#         """
#         # plugin's data
#         self._data = {}
# 
#         # common properties
#         self.encoding = request.encoding
# 
#         # backend specific properties
#         self.request = request
# 
#     def data(self, key=None, default=None):
#         """
#         Return achilles response dict. Achilles stores here data related
#         to the request, in order to prepare a reply.
# 
#         If key value is given, this function will return that key (if exists)
#         from achilles response dict.
# 
#         If default is given it will be asigned and returned if it doesn't exist
#         """
#         if key not in self._data and default is not None:
#             self._data[key] = default
# 
#         return self._data[key]
# 
# Path: achilles/actions.py
# class Library(BaseLibrary):
#     def __init__(self, namespace=None):
#     def _register(self, func, name=None):
#         def wrapper(transport, *args, **kwargs):
# def get(name):
# def run_actions(transport, actions):
# def render(transport):


from django.test import RequestFactory
from django.test import TestCase
from achilles.common import AchillesTransport
from achilles import actions



class ActionsTests(TestCase):

    @classmethod
    def setupClass(cls):
        cls.register = actions.Library()

    def setUp(self):
        request = RequestFactory().get('/path')

# Path: achilles/common.py
# class AchillesTransport(object):
#     """
#     Transport object, holds information context for some user requests
#     and response
#     """
#     def __init__(self, request):
#         """
#         Achilles Transport init for Django requests, it gets a request object
#         and fills its fields from it
#         """
#         # plugin's data
#         self._data = {}
# 
#         # common properties
#         self.encoding = request.encoding
# 
#         # backend specific properties
#         self.request = request
# 
#     def data(self, key=None, default=None):
#         """
#         Return achilles response dict. Achilles stores here data related
#         to the request, in order to prepare a reply.
# 
#         If key value is given, this function will return that key (if exists)
#         from achilles response dict.
# 
#         If default is given it will be asigned and returned if it doesn't exist
#         """
#         if key not in self._data and default is not None:
#             self._data[key] = default
# 
#         return self._data[key]
# 
# Path: achilles/actions.py
# class Library(BaseLibrary):
#     def __init__(self, namespace=None):
#     def _register(self, func, name=None):
#         def wrapper(transport, *args, **kwargs):
# def get(name):
# def run_actions(transport, actions):
# def render(transport):


# Path: achilles/tests/test_actions.py
from django.test import RequestFactory
from django.test import TestCase
from achilles.common import AchillesTransport
from achilles import actions




class ActionsTests(TestCase):

    @classmethod
    def setupClass(cls):
        cls.register = actions.Library()

    def setUp(self):
        request = RequestFactory().get('/path')

        self.transport = AchillesTransport(request)