def test_Log(self): imgdiff_stats = ImgdiffStats() imgdiff_stats.Log("/system/app/app2.apk", ImgdiffStats.USED_IMGDIFF) self.assertDictEqual( { ImgdiffStats.USED_IMGDIFF: {'/system/app/app2.apk'}, }, imgdiff_stats.stats)
def test_Log_invalidInputs(self): imgdiff_stats = ImgdiffStats() self.assertRaises(AssertionError, imgdiff_stats.Log, "/system/bin/gzip", ImgdiffStats.USED_IMGDIFF) self.assertRaises(AssertionError, imgdiff_stats.Log, "/system/app/app1.apk", "invalid reason")