Ejemplo n.º 1
0
 def testCreateStatisticsException(self):
     fsWorker = DataSourceWorkerFS()
     self.assertRaises(ParamError, fsWorker.createStatistics, None, 2, 3, 4)
     self.assertRaises(TypeError, fsWorker.createStatistics, 1, 2, 3, 4)
     self.assertRaises(ParamError, fsWorker.createStatistics, self.__ms,
                       None, 3, 4)
     self.assertRaises(TypeError, fsWorker.createStatistics, self.__ms, 2,
                       3, 4)
     self.assertRaises(TypeError, fsWorker.createStatistics, self.__ms,
                       self.__rnFS, self.__simN, 5)
Ejemplo n.º 2
0
 def setUp(self):
     self.__dirPath = os.path.abspath(os.curdir)
     firstPath = os.path.join(self.__dirPath, "resources/first")
     secondPath = os.path.join(self.__dirPath, "resources/second")
     self.__mongoUtils = MongoSaveRetrievalUtils(HOST, PORT, USR, PWD, DB,
                                                 FC_N, FC_DN, MDN)
     self.__mongoUtilsTypeError = MongoSaveUtils(HOST, PORT, USR, PWD, DB,
                                                 FC_N, FC_DN, MDN)
     self.__mongoReadUtils = MongoReadUtils(HOST, PORT, USR, PWD, DB, FC_N,
                                            FC_DN)
     self.__smN = SimpleNormalization()
     self.__scc = FSSourceCustomCallback()
     self.__rFS = ReaderNameFS([firstPath, secondPath])
     self.__fsWorker = DataSourceWorkerFS()
Ejemplo n.º 3
0
 def testCreateSourceNameIndexException(self):
     fsWorker = DataSourceWorkerFS()
     csn_m = fsWorker.createSourceNameIndex
     self.assertRaises(ParamError, csn_m, None, 2, 3, 4)
     self.assertRaises(TypeError, csn_m, 1, 2, 3, 4)
     self.assertRaises(ParamError, csn_m, self.__ms, None, 3, 4)
     self.assertRaises(TypeError, csn_m, self.__ms, 2, 3, 4)
     self.assertRaises(ParamError, csn_m, self.__ms, self.__mongoReadUtils,
                       None, 4)
     self.assertRaises(TypeError, csn_m, self.__ms, self.__mongoReadUtils,
                       3, 4)
     self.assertRaises(ParamError, csn_m, self.__ms, self.__mongoReadUtils,
                       self.__mongoSaveUtils, None)
     self.assertRaises(TypeError, csn_m, self.__ms, self.__mongoReadUtils,
                       self.__mongoSaveUtils, 1)
Ejemplo n.º 4
0
 def testCreateSourceNameIndex(self):
     fsWorker = DataSourceWorkerFS()
     fsWorker.createStatistics(self.__ms, self.__rnFS, self.__simN, self.__scc)
     fsWorker.createSourceNameIndex(self.__ms, self.__mongoReadUtils, self.__mongoSaveUtils, self.__simNamesN)
Ejemplo n.º 5
0
 def testCreateStatistics(self):
     fsWorker = DataSourceWorkerFS()
     fsWorker.createStatistics(self.__ms, self.__rnFS, self.__simN, self.__scc)
Ejemplo n.º 6
0
 def testCreateSourceNameIndex(self):
     fsWorker = DataSourceWorkerFS()
     fsWorker.createStatistics(self.__ms, self.__rnFS, self.__simN,
                               self.__scc)
     fsWorker.createSourceNameIndex(self.__ms, self.__mongoReadUtils,
                                    self.__mongoSaveUtils, self.__simNamesN)
Ejemplo n.º 7
0
 def testCreateStatistics(self):
     fsWorker = DataSourceWorkerFS()
     fsWorker.createStatistics(self.__ms, self.__rnFS, self.__simN,
                               self.__scc)