def setUp(self): PyMockTestCase.setUp(self) w3afSVNClient._get_repourl = dummy self.client = w3afSVNClient(LOCAL_PATH) self.client._repourl = REPO_URL self.client._svnclient = self.mock()
def setUp(self): PyMockTestCase.setUp(self) # Override auto_update module variable import core.controllers.auto_update.auto_update as autoupdmod autoupdmod.SVNClientClass = self.mock() self.vmgr = VersionMgr(LOCAL_PATH, dummy)
def tearDown(self): """ Given that nosetests test isolation is "incompatible" with w3af's kb, cf, etc. objects, and the tests written here are overwriting some classes that are loaded into sys.modules, I need to clean the mess after I finish. @see: http://mousebender.wordpress.com/2006/12/07/test-isolation-in-nose/ """ # print sys.modules['core.controllers.auto_update.w3afSVNClient'] # from ..auto_update import w3afSVNClient PyMockTestCase.tearDown(self)
def setUp(self): PyMockTestCase.setUp(self) # Start the proxy server self._proxy = proxy(self.IP, self.PORT, xUrllib(), w3afProxyHandler) self._proxy.start() # Build the proxy opener self.proxy_opener = urllib2.build_opener( urllib2.ProxyHandler( {"http": "http://%s:%s" % (self.IP, self.PORT)}), urllib2.HTTPHandler)
def setUp(self): # Setup objects PyMockTestCase.setUp(self) # The handler self.kahdler = KeepAliveHandler() self.kahdler._curr_check_failures = 1 # Only one timeout in-a-row # Host name self.host = 'host' # The connection self.conn = dummy() self.conn.is_fresh = 1 self.conn.getresponse = 'blah' # The request obj mock self.req = self.mock()
def setUp(self): PyMockTestCase.setUp(self)
def setUp(self): PyMockTestCase.setUp(self) self.scope = Scope(None, parent_scope=None)
def tearDown(self): PyMockTestCase.tearDown(self) # Shutdown the proxy server self._proxy.stop()
def setUp(self): PyMockTestCase.setUp(self) from ..auto_update import pysvn self.cli = self.mock() override(pysvn, "Client").expects().returns(self.cli)
def setUp(self): # Setup objects PyMockTestCase.setUp(self) self.plugininst = hvshsdist.http_vs_https_dist() self.fuzz_req = self.mock()
def setUp(self): PyMockTestCase.setUp(self) self.om = outputManager()
def setUp(self): PyMockTestCase.setUp(self) self.cm = ConnectionManager() self.host = dummy()