Exemplo n.º 1
0
 def test_runner_nocms(self):
     with work_in(self.basedir):
         with captured_output() as (out, err):
             with self.assertRaises(SystemExit) as exit:
                 args = list()
                 args.append('djangocms_helper')
                 args.append('example1')
                 args.append('test')
                 args.append('--runner=runners.CapturedOutputRunner')
                 runner.run('example1', args)
     self.assertTrue('Ran 6 tests in' in err.getvalue())
     self.assertEqual(exit.exception.code, 0)
Exemplo n.º 2
0
 def test_runner_nocms(self):
     with work_in(self.basedir):
         with captured_output() as (out, err):
             with self.assertRaises(SystemExit) as exit:
                 args = list()
                 args.append('djangocms_helper')
                 args.append('example1')
                 args.append('test')
                 args.append('--runner=runners.CapturedOutputRunner')
                 runner.run('example1', args)
     self.assertTrue('Ran 6 tests in' in err.getvalue())
     self.assertEqual(exit.exception.code, 0)
Exemplo n.º 3
0
    def test_runner_argv(self):
        def fake_runner(argv):
            return argv

        from djangocms_helper.test_utils.runners import CapturedOutputRunner
        with patch('django.test.runner.DiscoverRunner', CapturedOutputRunner):
            with work_in(self.basedir):
                with captured_output() as (out, err):
                    args = list()
                    args.append('djangocms_helper')
                    with patch('djangocms_helper.runner.runner', fake_runner):
                        data = runner.run('example1', args)
                    self.assertEqual(data, [u'djangocms_helper', u'example1', u'test'])
Exemplo n.º 4
0
    def test_runner_argv(self):
        def fake_runner(argv):
            return argv

        from djangocms_helper.test_utils.runners import CapturedOutputRunner
        with patch('django.test.runner.DiscoverRunner', CapturedOutputRunner):
            with work_in(self.basedir):
                with captured_output() as (out, err):
                    args = list()
                    args.append('djangocms_helper')
                    with patch('djangocms_helper.runner.runner', fake_runner):
                        data = runner.run('example1', args)
                    self.assertEqual(data, [u'djangocms_helper', u'example1', u'test'])
Exemplo n.º 5
0
def run():
    from djangocms_helper import runner
    runner.run('aldryn_categories')
Exemplo n.º 6
0
def run():
    from djangocms_helper import runner
    runner.run('knocker')
Exemplo n.º 7
0
def run():
    from djangocms_helper import runner
    runner.run('aldryn_categories')
Exemplo n.º 8
0
def run():
    from djangocms_helper import runner
    runner.run('djangocms_attributes_field')
Exemplo n.º 9
0
def run():
    from djangocms_helper import runner
    runner.run('filer')
Exemplo n.º 10
0
def run():
    from djangocms_helper import runner
    runner.run('knocker')
Exemplo n.º 11
0
def run():
    from djangocms_helper import runner
    runner.run('filer_celery')
Exemplo n.º 12
0
def run():
    from djangocms_helper import runner
    runner.run('meta')
def run():
    from djangocms_helper import runner
    runner.run('{{ cookiecutter.app_name }}')
Exemplo n.º 14
0
def run():
    from djangocms_helper import runner
    runner.run('aldryn_common', extra_args=[])
Exemplo n.º 15
0
def run():
    import sys
    from djangocms_helper import runner
    sys.path.insert(0, 'example')
    runner.run('meta_mixin')
Exemplo n.º 16
0
def run():
    from djangocms_helper import runner
    runner.run('aldryn_django')
Exemplo n.º 17
0
def run():
    from djangocms_helper import runner
    runner.run('djangocms_rest_view')
Exemplo n.º 18
0
def run():
    from djangocms_helper import runner
    runner.run('aldryn_sites')
def run():
    from djangocms_helper import runner
    runner.run('djangocms_attributes_field')