The Assimilation Project  based on Assimilation version
querytest.QueryTest Class Reference
Inheritance diagram for querytest.QueryTest:
Collaboration diagram for querytest.QueryTest:

Public Member Functions

def __init__ (self, store, querystring, classfactory, debug=False)
def check (self, objectlist, validator=None, minrows=None, maxrows=None, maxtries=300, delay=1)
def checkone (self, objectlist, validator=None, minrows=None, maxrows=None, debug=None)

Data Fields


Detailed Description

This class performs queries and validates that the results
meet some specific criteria.
This class is a component of our system test tools - not part of
the operational software.

The general idea is that after a test completes, we can see if it updated
the database correctly by running some particular query whose results
can be evaluated for correctness.

Definition at line 45 of file

Constructor & Destructor Documentation

def querytest.QueryTest.__init__ (   self,
  debug = False 
Init function for the QueryTest class
The querystring we're given will be given to the string <i>format</i> method
along with a set of objects passed in to runandcheck() to create the final query.

Definition at line 56 of file

Member Function Documentation

def querytest.QueryTest.check (   self,
  validator = None,
  minrows = None,
  maxrows = None,
  maxtries = 300,
  delay = 1 
We run a query using _checkone_ repeatedly until we like the results or give up...
It's hard to know when everything is done like it ought to be...
Maxtries is the maximum of attempts to make for getting good query results
Delay is the how long to wait between query calls

Definition at line 69 of file

References querytest.QueryTest.checkone().

Here is the call graph for this function:

def querytest.QueryTest.checkone (   self,
  validator = None,
  minrows = None,
  maxrows = None,
  debug = None 
We run a query and see if we like the results:
- use the format() method to format the query using the objects in <i>objectlist</i>
- run the query
- validate the results of the query by calling <i>validator</i> on each row retrieved

We return False if the validator dislikes any query row, or if the wrong number of
rows was returned, and True if everything looks good.

Definition at line 87 of file

References querytest.QueryTest.classfactory, cma.cmadb.CMAdb.debug, cma.discoverylistener.DiscoveryListener.debug, querytest.QueryTest.debug, logwatcher.LogWatcher.debug,, docker.DockerSystem.debug, and docker.SystemTestEnvironment.debug.

Referenced by querytest.QueryTest.check().

Here is the caller graph for this function:

Field Documentation


Definition at line 65 of file

Referenced by querytest.QueryTest.checkone().


Definition at line 62 of file


Definition at line 63 of file

The documentation for this class was generated from the following file: