Back to index

plone3  3.1.7
bbb_oldkssdemo.py
Go to the documentation of this file.
00001 
00002 
00003 # XXX future BBB
00004 # Provide a way for the old kss.demo version, not to fail
00005 # with import error - even if it cannot execute these tests.
00006 # This enables that the package can contain application level
00007 # test setup, but it still does not fail with the old version.
00008 try:
00009     import kss.demo
00010     from kss.demo import (
00011         KSSSeleniumTestDirectory,
00012         KSSDemo,
00013         KSSSeleniumTestCase,
00014         KSSSeleniumTestSuite,
00015         KSSSeleniumTestLayerBase,
00016         KSSSeleniumSandboxCreationTestCase,
00017         )
00018 except ImportError:
00019     # nonexistent constructs. They will not work, but
00020     # they will run without errors.
00021     class Fake(object):
00022         # test_directory is needed because the caller code
00023         # will treat us as a TestDirectory. So, we give a
00024         # directory that does not contain any *.html files.
00025         test_directory = '/'
00026         def __init__(self, *arg, **kw):
00027             pass
00028     #
00029     import kss.demo.resource
00030     # Provide the classes directly on kss.demo namespace
00031     kss.demo.KSSSeleniumTestDirectory = kss.demo.resource.KSSSeleniumTestDirectory
00032     kss.demo.KSSDemo = kss.demo.resource.KSSDemo
00033     kss.demo.KSSSeleniumTestCase = Fake
00034     kss.demo.KSSSeleniumTestSuite = Fake
00035     kss.demo.KSSSeleniumTestLayerBase = Fake
00036     kss.demo.KSSSeleniumSandboxCreationTestCase = Fake