def testNoQualifier(self): """Tests NoSize Calculations based on Input. Should convert No Qualifiers to MB """ liten = Liten(spath='testData', fileSize=self.NoQualifier) self.assertEqual(liten.convertSize(liten.fileSize), 1048576)
def testNoQualifier(self): """Tests NoSize Calculations based on Input. Should convert No Qualifiers to MB """ liten = Liten(spath="testData", fileSize=self.NoQualifier) self.assertEqual(liten.convertSize(liten.fileSize), 1048576)
def testNoQualifier(self): """Tests NoSize Calculations based on Input. Should convert No Qualifiers to MB """ liten = Liten(spath='testData', fileSize=self.NoQualifier) NoSizeType = liten.sizeType()
def testBogus(self): """Tests Bogus Size Input. Should raise exception UnboundLocalError or fail """ try: liten = Liten(spath='testData', fileSize=self.Bogus) BogusType = liten.sizeType() except UnboundLocalError: pass
def testBogus(self): """Tests Bogus Size Input. Should raise exception ValueError or fail """ liten = Liten(spath='testData', fileSize=self.Bogus) self.assertRaises(ValueError, liten.convertSize, liten.fileSize)
def testDupeFileDetection(self): """Test checksum of duplicate files""" liten = Liten(spath='testData') checksumOne = liten.createChecksum(self.dupeFileOne) checksumTwo = liten.createChecksum(self.dupeFileTwo) self.assertEqual(checksumOne, checksumTwo)
def testDupeFileDetectionError(self): """Test checksum of Non-duplicate files""" liten = Liten(spath='testData') checksumOne = liten.createChecksum(self.dupeFileOne) checksumThree = liten.createChecksum(self.nonDupeFile) self.assertNotEqual(checksumOne, checksumThree)
def badChecksumDetection(self): """Bad Checksum Detection Should Raise Exception.""" liten = Liten(spath='testData') badChecksumAttempt = liten.createChecksum('fileNotFound.txt')
def testGBconvertSize(self): """Tests GBSize Calculations based on Input.""" self.assertEqual(Liten().convertSize(self.GBFileSize), 1073741824)
def testModDate(self): """Test modDate method.""" liten = Liten(spath='testData') modDate = liten.makeModDate(self.fakePath)
def testGBSizeType(self): """Tests GBSize Calculations based on Input.""" liten = Liten(spath='testData', fileSize=self.GBFileSize) GBSizeType = liten.sizeType() self.assertEqual(GBSizeType, 1073741824)
def testKByteconvertSize(self): """Tests KBSize Calculations based on Input.""" self.assertEqual(Liten().convertSize(self.KBFileSize), 1024)
def testKByteSizeType(self): """Tests KBSize Calculations based on Input.""" liten = Liten(spath='testData', fileSize=self.KBFileSize) KBSizeType = liten.sizeType() self.assertEqual(KBSizeType, 1024)
def testMBByteSizeType(self): """Tests MBSize Calculations based on Input.""" liten = Liten(spath='testData', fileSize=self.MBFileSize) MBSizeType = liten.sizeType() self.assertEqual(MBSizeType, 1048576)
def testByteSizeType(self): """Tests ByteSize Calculations based on Input.""" liten = Liten(spath='testData', fileSize=self.byteFileSize) byteSizeType = liten.sizeType() self.assertEqual(byteSizeType, 1)
def testCreateExt(self): """Test Create Extension Method.""" liten = Liten(spath='testData') createExt = liten.createExt(self.dupeFileOne) self.assertEqual(createExt, ".txt")
def testDupeFileDetectionError(self): """Test checksum of Non-duplicate files""" liten = Liten(spath='testData') checksumOne = liten.createChecksum(self.dupeFileOne) checksumThree= liten.createChecksum(self.nonDupeFile) self.assertNotEqual(checksumOne, checksumThree)
def testTBSizeType(self): """Tests TBSize Calculations based on Input.""" liten = Liten(spath='testData', fileSize=self.TBFileSize) TBSizeType = liten.sizeType() self.assertEqual(TBSizeType, 1099511627776)
def testByteconvertSize(self): """Tests ByteSize Calculations based on Input.""" liten = Liten(spath='testData', fileSize=self.byteFileSize) byteconvertSize = liten.convertSize(liten.fileSize) self.assertEqual(byteconvertSize, 1)
def testCreateDate(self): """Test createDate method.""" liten = Liten(spath='testData') createDate = liten.makeCreateDate(self.fakePath)
def testMBByteconvertSize(self): """Tests MBSize Calculations based on Input.""" self.assertEqual(Liten().convertSize(self.MBFileSize), 1048576)
def testTBconvertSize(self): """Tests TBSize Calculations based on Input.""" self.assertEqual(Liten().convertSize(self.TBFileSize), 1099511627776)
def testByteconvertSize(self): """Tests ByteSize Calculations based on Input.""" liten = Liten(spath="testData", fileSize=self.byteFileSize) byteconvertSize = liten.convertSize(liten.fileSize) self.assertEqual(byteconvertSize, 1)