def testSetupCache(self, build_info): build_info.CachePath.return_value = '/test/cache/path' sc = file_system.SetupCache([], build_info) sc.Run() self.assertTrue(file_system.os.path.exists('/test/cache/path'))
def testSetupCacheValidate(self): sc = file_system.SetupCache('String', None) self.assertRaises(file_system.ValidationError, sc.Validate) sc = file_system.SetupCache([], None) sc.Validate()
def testSetupCache(self, build_info, create): build_info.CachePath.return_value = '/test/cache/path' file_system.SetupCache([], build_info).Run() create.assert_called_with('/test/cache/path')