Ejemplo n.º 1
0
 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)
Ejemplo n.º 2
0
    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")