Пример #1
0
 def setUp(self):
     self.__mongoUtils = MongoSaveUtils(HOST, PORT, USR, PWD, DB, FC_N,
                                        FC_DN, MDN)
     self.__simpleNormal = SimpleNormalization()
     self.__fileSourceCustom = FileSourceCustom()
     self.__fileBlockSource = FileBlockSource()
     self.__calcMongo = CalcMongo()
     self.__mongoStatistics = MongoStatistic(self.__mongoUtils)
     self.__dirPath = os.path.abspath(os.curdir)
 def testGetSourceName(self):
     firstPath = os.path.join(self.__dirPath, "resources/first")
     secondPath = os.path.join(self.__dirPath, "resources/second")
     readerNameFS = ReaderNameFS([firstPath, secondPath])
     fileSource = FileSource()
     fileSourceCustom = FileSourceCustom()
     for itemFile in readerNameFS.getSourceCustom():
         fileSourceCustom.custom = itemFile
         openSource = fileSource.openSource(fileSourceCustom.custom)
         self.assertIsNotNone(fileSource.getName(openSource), "filename is not to be a None object")
         fileSource.closeSource(openSource)