Ejemplo n.º 1
0
 def test_get_cwd(self):
     """
     This is a bad test
     """
     template_server = TemplateServer()
     cwd = template_server.get_cwd()
     self.assertIsNotNone(cwd)
Ejemplo n.º 2
0
class Command(BaseCommand):
    def __init__(self):
        super().__init__()

        self.server = TemplateServer()

    def handle(self, *args, **options):
        atexit.register(self.server.terminate)
        self.server.start()

        while True: sleep(1)
Ejemplo n.º 3
0
    def test_get_options(self):
        """
        Test get options, including custom renderer
        """
        template_server = TemplateServer()
        options = template_server.get_options()
        expected = ['debug=False']
        self.assertEqual(options, expected)

        with self.settings(DJANGO_ISOMORPHIC_RENDERER='test.js'):
            options = template_server.get_options()
            expected = ['debug=False', 'renderer=test.js']
            self.assertListEqual(options, expected)
Ejemplo n.º 4
0
    def __init__(self):
        super().__init__()

        self.server = TemplateServer()