Exemplo n.º 1
0
 def test_runner_cms_exception(self):
     try:
         import cms
         raise unittest.SkipTest('django CMS available, skipping test')
     except ImportError:
         pass
     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):
                 with self.assertRaises(ImportError) as exit:
                     args = list()
                     args.append('djangocms_helper')
                     runner.cms('example1', args)
Exemplo n.º 2
0
 def test_runner_cms_exception(self):
     try:
         import cms
         raise unittest.SkipTest('django CMS available, skipping test')
     except ImportError:
         pass
     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):
                 with self.assertRaises(ImportError) as exit:
                     args = list()
                     args.append('djangocms_helper')
                     runner.cms('example1', args)
Exemplo n.º 3
0
 def test_runner(self):
     try:
         import cms
     except ImportError:
         raise unittest.SkipTest('django CMS not available, skipping test')
     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.cms('example1', args)
     self.assertTrue('Ran 6 tests in' in err.getvalue())
     self.assertEqual(exit.exception.code, 0)
Exemplo n.º 4
0
 def test_runner(self):
     try:
         import cms
     except ImportError:
         raise unittest.SkipTest('django CMS not available, skipping test')
     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.cms('example1', args)
     self.assertTrue('Ran 6 tests in' in err.getvalue())
     self.assertEqual(exit.exception.code, 0)
Exemplo n.º 5
0
 def test_runner_simple(self):
     try:
         import cms
     except ImportError:
         raise unittest.SkipTest('django CMS not available, skipping test')
     from djangocms_helper.test_utils.runners import CapturedOutputSimpleRunner
     with patch('django.test.simple.DjangoTestSuiteRunner', CapturedOutputSimpleRunner):
         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('test')
                     args.append('example1')
                     args.append('--simple-runner')
                     args.append('example1.FakeTests')
                     runner.cms('example1', args)
     self.assertTrue('Ran 12 tests in' in err.getvalue())
     self.assertEqual(exit.exception.code, 0)
Exemplo n.º 6
0
 def test_runner(self):
     try:
         import cms
     except ImportError:
         raise unittest.SkipTest('django CMS not available, skipping test')
     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):
                 with self.assertRaises(SystemExit) as exit:
                     args = list()
                     args.append('djangocms_helper')
                     args.append('test')
                     args.append('example1')
                     runner.cms('example1', args)
     self.assertTrue('visible string' in out.getvalue())
     self.assertFalse('hidden string' in out.getvalue())
     self.assertFalse('hidden string' in err.getvalue())
     self.assertTrue('Ran 12 tests in' in err.getvalue())
     self.assertEqual(exit.exception.code, 0)
Exemplo n.º 7
0
 def test_runner_simple(self):
     try:
         import cms
     except ImportError:
         raise unittest.SkipTest('django CMS not available, skipping test')
     from djangocms_helper.test_utils.runners import CapturedOutputSimpleRunner
     with patch('django.test.simple.DjangoTestSuiteRunner',
                CapturedOutputSimpleRunner):
         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('test')
                     args.append('example1')
                     args.append('--simple-runner')
                     args.append('example1.FakeTests')
                     runner.cms('example1', args)
     self.assertTrue('Ran 12 tests in' in err.getvalue())
     self.assertEqual(exit.exception.code, 0)
Exemplo n.º 8
0
 def test_runner_wrong(self):
     try:
         import cms
     except ImportError:
         raise unittest.SkipTest('django CMS not available, skipping test')
     with work_in(self.basedir):
         if sys.version_info < (3, 5):
             exception = ImportError
         else:
             exception = SystemExit
         with captured_output() as (out, err):
             with self.assertRaises(exception) as exit:
                 args = list()
                 args.append('djangocms_helper')
                 args.append('test')
                 args.append('example1')
                 args.append('--runner=runners.CapturedOutputRunner')
                 args.append('whatever')
                 runner.cms('example1', args)
     if sys.version_info >= (3, 5):
         self.assertEqual(exit.exception.code, 1)
Exemplo n.º 9
0
 def test_runner_wrong(self):
     try:
         import cms
     except ImportError:
         raise unittest.SkipTest('django CMS not available, skipping test')
     with work_in(self.basedir):
         with captured_output():
             if sys.version_info < (3, 5):
                 exception = ImportError
             else:
                 exception = SystemExit
             with self.assertRaises(exception) as exit:
                 args = list()
                 args.append('djangocms_helper')
                 args.append('test')
                 args.append('example1')
                 args.append('--runner=runners.CapturedOutputRunner')
                 args.append('whatever')
                 runner.cms('example1', args)
     if sys.version_info >= (3, 5):
         self.assertEqual(exit.exception.code, 1)
Exemplo n.º 10
0
 def test_runner(self):
     try:
         import cms
     except ImportError:
         raise unittest.SkipTest('django CMS not available, skipping test')
     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):
                 with self.assertRaises(SystemExit) as exit:
                     args = list()
                     args.append('djangocms_helper')
                     args.append('test')
                     args.append('--extra-settings=cms_helper.py')
                     args.append('example1')
                     runner.cms('example1', args)
     self.assertTrue('visible string' in out.getvalue())
     self.assertFalse('hidden string' in out.getvalue())
     self.assertFalse('hidden string' in err.getvalue())
     self.assertTrue('Ran 14 tests in' in err.getvalue())
     self.assertEqual(exit.exception.code, 0)
Exemplo n.º 11
0
    def test_runner_cms_argv(self):
        try:
            import cms
        except ImportError:
            raise unittest.SkipTest('django CMS not available, skipping test')

        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.cms('example1', args)
                    self.assertEqual(data, ['djangocms_helper', 'example1', 'test', '--cms'])
Exemplo n.º 12
0
    def test_runner_cms_argv(self):
        try:
            import cms
        except ImportError:
            raise unittest.SkipTest('django CMS not available, skipping test')

        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.cms('example1', args)
                    self.assertEqual(data, ['djangocms_helper', 'example1', 'test', '--cms'])
Exemplo n.º 13
0
def run():
    from djangocms_helper import runner
    runner.cms('djangocms_multisite')
def run():
    from djangocms_helper import runner
    runner.cms('site_search')
def run():
    from djangocms_helper import runner
    runner.cms('djangocms_text_ckeditor')
Exemplo n.º 16
0
def run():
    from djangocms_helper import runner
    runner.cms('djangocms_listyle')
Exemplo n.º 17
0
def run():
    from djangocms_helper import runner
    runner.cms('aldryn_people')
Exemplo n.º 18
0
def run():
    from djangocms_helper import runner
    runner.cms('aldryn_forms')
Exemplo n.º 19
0
def run():
    from djangocms_helper import runner
    runner.cms('aldryn_newsblog')
Exemplo n.º 20
0
def run():
    from djangocms_helper import runner
    runner.cms('djangocms_page_meta')
Exemplo n.º 21
0
def run():
    from djangocms_helper import runner
    runner.cms('aldryn_jobs', extra_args=[])
Exemplo n.º 22
0
def run():
    from djangocms_helper import runner
    runner.cms('djangocms_attributes_field')
Exemplo n.º 23
0
def run():
    runner.cms('djangocms_contact')
Exemplo n.º 24
0
def run():
    from djangocms_helper import runner
    runner.cms('aldryn_faq', extra_args=[])
def run():
    import sys
    from djangocms_helper import runner

    runner.cms("djangocms_text_ckeditor")
Exemplo n.º 26
0
def run():
    from djangocms_helper import runner

    runner.cms("aldryn_video")
Exemplo n.º 27
0
def run():
    from djangocms_helper import runner
    runner.cms('djangocms_articles')
Exemplo n.º 28
0
def run():
    from djangocms_helper import runner
    runner.cms('djangocms_comments')
Exemplo n.º 29
0
def run():
    from djangocms_helper import runner
    # --boilerplate option will ensure correct boilerplate settings are
    # added to settings
    runner.cms('aldryn_newsblog', extra_args=[])
def run():
    from djangocms_helper import runner

    runner.cms("djangocms_fil_bootstrap", extra_args=[])
Exemplo n.º 31
0
def run():
    from djangocms_helper import runner
    runner.cms('djangocms_highlightjs')
Exemplo n.º 32
0
def run():
    from djangocms_helper import runner
    runner.cms('cmsplugin_filer_file')
Exemplo n.º 33
0
def run():
    from djangocms_helper import runner
    runner.cms('djangocms_versioning_filer', extra_args=[])
Exemplo n.º 34
0
def run():
    from djangocms_helper import runner

    runner.cms("aldryn_events", extra_args=["--boilerplate"])
Exemplo n.º 35
0
def run():
    from djangocms_helper import runner
    runner.cms('djangocms_picture')
Exemplo n.º 36
0
def run():
    from djangocms_helper import runner
    runner.cms('aldryn_newsblog')
Exemplo n.º 37
0
def run():
    from djangocms_helper import runner
    runner.cms('aldryn_snippet')
Exemplo n.º 38
0
def run():
    from djangocms_helper import runner
    runner.cms("djangocms_navigation", extra_args=[])
Exemplo n.º 39
0
def run():
    from djangocms_helper import runner
    runner.cms('djangocms_style')
Exemplo n.º 40
0
def run():
    from djangocms_helper import runner
    runner.cms('djangocms_bootstrap4')
Exemplo n.º 41
0
def run():
    from djangocms_helper import runner
    runner.cms('djangocms_blog')
Exemplo n.º 42
0
def run():
    from djangocms_helper import runner
    runner.cms('aldryn_faq', extra_args=['--boilerplate'])
Exemplo n.º 43
0
def run():
    from djangocms_helper import runner
    sys.argv.append('--nose-runner')
    runner.cms('djangocms_blog')
Exemplo n.º 44
0
def run():
    from djangocms_helper import runner

    runner.cms("djangocms_url_manager", extra_args=[])
Exemplo n.º 45
0
def run():
    import sys
    from djangocms_helper import runner
    runner.cms('djangocms_wow')
Exemplo n.º 46
0
def run():
    from djangocms_helper import runner
    runner.cms('djangocms_page_meta')
Exemplo n.º 47
0
def run():
    from djangocms_helper import runner
    runner.cms('djangocms_inline_comment')
Exemplo n.º 48
0
def run():
    from djangocms_helper import runner
    runner.cms('djangocms_blog')
Exemplo n.º 49
0
def run():
    from djangocms_helper import runner
    runner.cms('aldryn_snippet')
Exemplo n.º 50
0
def run():
    from djangocms_helper import runner
    runner.cms('djangocms_page_sitemap')
Exemplo n.º 51
0
def run():
    from djangocms_helper import runner
    runner.cms('djangocms_page_sitemap')
Exemplo n.º 52
0
def run():
    from djangocms_helper import runner
    runner.cms('djangocms_link_manager')
Exemplo n.º 53
0
def run():
    from djangocms_helper import runner

    runner.cms("djangocms_versioning", extra_args=[])
Exemplo n.º 54
0
def run():
    from djangocms_helper import runner
    runner.cms("djangocms_pageadmin", extra_args=[])
Exemplo n.º 55
0
def run():
    from djangocms_helper import runner
    runner.cms('example1')
Exemplo n.º 56
0
def run():
    from djangocms_helper import runner
    runner.cms('aldryn_tours')
Exemplo n.º 57
0
def run():
    from djangocms_helper import runner
    runner.cms('example1')
Exemplo n.º 58
0
def run():
    import sys
    from djangocms_helper import runner
    runner.cms('djangocms_scroll_smooth')
Exemplo n.º 59
0
def run():
    from djangocms_helper import runner
    # --boilerplate option will ensure correct boilerplate settings are
    # added to settings
    runner.cms('aldryn_newsblog', extra_args=['--boilerplate'])