class SeleniumTestCase(TransactionTestCase): def __getattribute__(self, name): try: attr = object.__getattribute__(self, name) except AttributeError: attr = object.__getattribute__(self, "driver").__getattribute__(name) return attr def _fixture_setup(self): test_server = selenium_server.get_test_server() test_server.deactivate() transaction.commit_unless_managed() transaction.enter_transaction_management() transaction.managed(True) super(SeleniumTestCase, self)._fixture_setup() transaction.commit() transaction.leave_transaction_management() test_server.activate() def setUp(self): import socket socket.setdefaulttimeout(settings.SELENIUM_TIMEOUT) self.driver = MyDriver() def tearDown(self): self.driver.quit()
def setUpClass(cls): cls.driver = MyDriver() super(SeleniumLiveTestCase, cls).setUpClass()
def setUp(self): import socket socket.setdefaulttimeout(settings.SELENIUM_TIMEOUT) self.driver = MyDriver()