# Path: isomorphic/client/template_client.py
# BUFFER_SIZE = 8192
# def _make_none(obj):
# def clean_context(context):
#     def render_template(self, file_path, context=None, request_data=None):
#     def connect(self):
#     def receive(self, sock):
# class JsTemplateException(Exception):
# class TemplateClient():


from django.test import TestCase
from isomorphic.client import template_client
from django.conf import settings
from os.path import join


class MockSock():
    def send(self, message):
        pass

    def recv(self, buffer_size):
        return b''


def mock_connect():
    return MockSock()


class TestTemplateClient(TestCase):
    def test_make_none(self):
        """
        Test JSON conversion doesn't fail when object can't be serialized
        """
        class Foo():
            def __str__(self):
                return 'foo'

        foo = Foo()

# Path: isomorphic/client/template_client.py
# BUFFER_SIZE = 8192
# def _make_none(obj):
# def clean_context(context):
#     def render_template(self, file_path, context=None, request_data=None):
#     def connect(self):
#     def receive(self, sock):
# class JsTemplateException(Exception):
# class TemplateClient():


# Path: tests/test_template_client.py
from django.test import TestCase
from isomorphic.client import template_client
from django.conf import settings
from os.path import join



class MockSock():
    def send(self, message):
        pass

    def recv(self, buffer_size):
        return b''


def mock_connect():
    return MockSock()


class TestTemplateClient(TestCase):
    def test_make_none(self):
        """
        Test JSON conversion doesn't fail when object can't be serialized
        """
        class Foo():
            def __str__(self):
                return 'foo'

        foo = Foo()

        is_none = template_client._make_none(foo)