Added tag cubicweb-version-3.9.0 for changeset d9936c39d478
fromcubicweb.devtoolsimportcwwindmillclassCubicWebWindmillUseCase(cwwindmill.CubicWebWindmillUseCase):"""class for windmill use case tests From test server parameters: :params ports_range: range of http ports to test (range(7000, 8000) by default) :type ports_range: iterable :param anonymous_logged: is anonymous user logged by default ? :type anonymous_logged: bool The first port found as available in `ports_range` will be used to launch the test server From Windmill configuration: :param browser: browser identification string (firefox|ie|safari|chrome) (firefox by default) :param test_dir: testing file path or directory (./windmill by default) """#ports_range = range(7000, 8000)anonymous_logged=False#browser = 'firefox'#test_dir = osp.join(os.getcwd(), 'windmill')# If you prefer, you can put here the use cases recorded by windmill GUI# (services transformer) instead of the windmill sub-directory# You can change `test_dir` as following:#test_dir = __file__fromwindmill.authoringimportWindmillTestClientdeftest_usecase():client=WindmillTestClient(__name__)importpdb;pdb.set_trace()client.open(url=u'/')# ...if__name__=='__main__':cwwindmill.unittest_main()