def __init__(self, mdb, output_filename="-", formatter="json", batchID=None, limit=None, view=None): self._mdb = mdb audit = Audit(mdb) self._sorter = None self._start_date = None self._end_date = None self._filename = output_filename self._format = formatter self._files = [] self._limit = limit self._view = view if batchID is None: self._batchID = audit.getCurrentValidBatchID() else: self._batchID = batchID self._pro_account = audit.isProBatch(self._batchID)
def __init__(self, mdb, formatter="json", batchID=None, limit=None, view=None): self._mdb = mdb audit = Audit(mdb) self._sorter = None self._start_date = None self._end_date = None self._format = formatter self._files = [] self._limit = limit self._view = view if batchID is None: self._batchID = audit.get_last_valid_batch_id() else: self._batchID = batchID self._pro_account = audit.isProBatch(self._batchID)
def test_groups(self): filename = self._analytics.get_groups( [ "DublinMUG" ], "test_groups.json") self.assertTrue( os.path.isfile( filename )) audit = Audit( self._mdb ) self.assertTrue( audit.isProBatch( self._analytics.get_batch_ID())) os.unlink( filename )