Package funkload :: Module ZopeTestCase :: Class ZopeTestCase
[show private | hide private]
[frames | no frames]

Type ZopeTestCase

  object --+        
           |        
    TestCase --+    
               |    
FunkLoadTestCase --+
                   |
                  ZopeTestCase

Known Subclasses:
CPSTestCase, CPSTestCase

Common zope 2.8 tasks.
Method Summary
  zopeAddExternalMethod(self, parent_url, admin_id, admin_pwd, method_id, module, function, run_it)
Add an External method an run it.
  zopeFlushCache(self, zope_url, admin_id, admin_pwd, database)
Remove all objects from all ZODB in-memory caches.
  zopePackZodb(self, zope_url, admin_id, admin_pwd, database, days)
Pack a zodb database.
  zopeRestart(self, zope_url, admin_id, admin_pwd, time_out)
Stop and Start Zope server.
    Inherited from FunkLoadTestCase
  __init__(self, methodName, options)
Initialise the test case.
  __call__(self, result)
Run the test method.
  addHeader(self, key, value)
Add an http header.
  clearBasicAuth(self)
Remove basic authentication.
  clearContext(self)
Resset the testcase.
  clearHeaders(self)
Remove all http headers set by addHeader or setUserAgent.
  conf_get(self, section, key, default, quiet)
Return an entry from the options or configuration file.
  conf_getFloat(self, section, key, default, quiet)
Return a float from the configuration file.
  conf_getInt(self, section, key, default, quiet)
Return an integer from the configuration file.
  conf_getList(self, section, key, default, quiet, separator)
Return a list from the configuration file.
  delHeader(self, key)
Remove an http header key.
  exists(self, url, params, description)
Try a GET on URL return True if the page exists or False.
  get(self, url, params, description, ok_codes)
GET method on url adding params.
  getBody(self)
Return the last response content.
  getLastBaseUrl(self)
Return the base href url.
  getLastUrl(self)
Return the last accessed url taking into account redirection.
  listHref(self, pattern)
Return a list of href anchor url present in the last html response.
  logd(self, message)
Debug log.
  logdd(self, message)
Verbose Debug log.
  logi(self, message)
Info log.
  post(self, url, params, description, ok_codes)
POST method on url with params.
  setBasicAuth(self, login, password)
Set http basic authentication.
  setHeader(self, key, value)
Add or override an http header.
  setUpCycle(self)
Called on bench mode before a cycle start.
  setUserAgent(self, agent)
Set User-Agent http header for the next requests.
  sleep(self)
Sleeps a random amount of time.
  tearDownCycle(self)
Called after a cycle in bench mode.
  waitUntilAvailable(self, url, time_out, sleep_time)
Wait until url is available.
  xmlrpc(self, url_in, method_name, params, description)
Call an xml rpc method_name on url with params.
  xmlrpc_call(self, url_in, method_name, params, description)
BBB of xmlrpc, this method will be removed for 1.6.0.
    Inherited from TestCase
  __repr__(self)
  __str__(self)
  assert_(self, expr, msg)
Fail the test unless the expression is true.
  assertAlmostEqual(self, first, second, places, msg)
Fail if the two objects are unequal as determined by their difference rounded to the given number of decimal places (default 7) and comparing to zero.
  assertAlmostEquals(self, first, second, places, msg)
Fail if the two objects are unequal as determined by their difference rounded to the given number of decimal places (default 7) and comparing to zero.
  assertEqual(self, first, second, msg)
Fail if the two objects are unequal as determined by the '==' operator.
  assertEquals(self, first, second, msg)
Fail if the two objects are unequal as determined by the '==' operator.
  assertFalse(self, expr, msg)
Fail the test if the expression is true.
  assertNotAlmostEqual(self, first, second, places, msg)
Fail if the two objects are equal as determined by their difference rounded to the given number of decimal places (default 7) and comparing to zero.
  assertNotAlmostEquals(self, first, second, places, msg)
Fail if the two objects are equal as determined by their difference rounded to the given number of decimal places (default 7) and comparing to zero.
  assertNotEqual(self, first, second, msg)
Fail if the two objects are equal as determined by the '==' operator.
  assertNotEquals(self, first, second, msg)
Fail if the two objects are equal as determined by the '==' operator.
  assertRaises(self, excClass, callableObj, *args, **kwargs)
Fail unless an exception of class excClass is thrown by callableObj when invoked with arguments args and keyword arguments kwargs.
  assertTrue(self, expr, msg)
Fail the test unless the expression is true.
  countTestCases(self)
  debug(self)
Run the test without collecting errors in a TestResult
  defaultTestResult(self)
  fail(self, msg)
Fail immediately, with the given message.
  failIf(self, expr, msg)
Fail the test if the expression is true.
  failIfAlmostEqual(self, first, second, places, msg)
Fail if the two objects are equal as determined by their difference rounded to the given number of decimal places (default 7) and comparing to zero.
  failIfEqual(self, first, second, msg)
Fail if the two objects are equal as determined by the '==' operator.
  failUnless(self, expr, msg)
Fail the test unless the expression is true.
  failUnlessAlmostEqual(self, first, second, places, msg)
Fail if the two objects are unequal as determined by their difference rounded to the given number of decimal places (default 7) and comparing to zero.
  failUnlessEqual(self, first, second, msg)
Fail if the two objects are unequal as determined by the '==' operator.
  failUnlessRaises(self, excClass, callableObj, *args, **kwargs)
Fail unless an exception of class excClass is thrown by callableObj when invoked with arguments args and keyword arguments kwargs.
  id(self)
  run(self, result)
  setUp(self)
Hook method for setting up the test fixture before exercising it.
  shortDescription(self)
Returns a one-line description of the test, or None if no description has been provided.
  tearDown(self)
Hook method for deconstructing the test fixture after testing it.
    Inherited from object
  __delattr__(...)
x.__delattr__('name') <==> del x.name
  __getattribute__(...)
x.__getattribute__('name') <==> x.name
  __hash__(x)
x.__hash__() <==> hash(x)
  __new__(T, S, ...)
T.__new__(S, ...) -> a new object with type S, a subtype of T
  __reduce__(...)
helper for pickle
  __reduce_ex__(...)
helper for pickle
  __setattr__(...)
x.__setattr__('name', value) <==> x.name = value

Method Details

zopeAddExternalMethod(self, parent_url, admin_id, admin_pwd, method_id, module, function, run_it=True)

Add an External method an run it.

zopeFlushCache(self, zope_url, admin_id, admin_pwd, database='main')

Remove all objects from all ZODB in-memory caches.

zopePackZodb(self, zope_url, admin_id, admin_pwd, database='main', days=0)

Pack a zodb database.

zopeRestart(self, zope_url, admin_id, admin_pwd, time_out=600)

Stop and Start Zope server.

Generated by Epydoc 2.1 on Tue Feb 27 10:41:42 2007 http://epydoc.sf.net