#following code is to simulate communication from db to tc import random if random randrange( , = return - def update(self)print "updating the test results in databasetime sleep( def settm(self,tm)self _tm tm class testmanagerdef __init__(self)self _reporter none self _db none self _tc none def preparereporting(self)rvalue self _db insert(if rvalue =- self _tc setproblem( self _reporter prepare(def setreporter(selfreporter)self _reporter reporter def setdb(selfdb)self _db db def publishreport(self)self _db update(rvalue self _reporter report(def settc(self,tc)self _tc tc if __name__ ='__main__'reporter reporter(db db(tm testmanager(tm setreporter(reportertm setdb(dbreporter settm(tmdb settm(tm www testingperspective com