Exemplo n.º 1
0
  def testTree(self):
    client_urn = self.SetupClient(0)

    self._Touch(client_urn.Add("fs/os").Add("foo/bar/baz"), content="aaa")
    self._Touch(client_urn.Add("fs/os").Add("foo/quux/norf"), content="bbb")

    vfs = data_migration.ListVfs(client_urn)
    self.assertIn(client_urn.Add("fs/os").Add("foo"), vfs)
    self.assertIn(client_urn.Add("fs/os").Add("foo/bar"), vfs)
    self.assertIn(client_urn.Add("fs/os").Add("foo/bar/baz"), vfs)
    self.assertIn(client_urn.Add("fs/os").Add("foo/quux"), vfs)
    self.assertIn(client_urn.Add("fs/os").Add("foo/quux/norf"), vfs)
Exemplo n.º 2
0
    def testVariousRoots(self):
        client_urn = self.SetupClient(0)

        self._Touch(client_urn.Add("fs/os").Add("foo"), content=b"foo")
        self._Touch(client_urn.Add("fs/tsk").Add("bar"), content=b"bar")
        self._Touch(client_urn.Add("temp").Add("foo"), content=b"foo")
        self._Touch(client_urn.Add("registry").Add("bar"), content=b"bar")

        vfs = data_migration.ListVfs(client_urn)
        self.assertIn(client_urn.Add("fs/os").Add("foo"), vfs)
        self.assertIn(client_urn.Add("fs/tsk").Add("bar"), vfs)
        self.assertIn(client_urn.Add("temp").Add("foo"), vfs)
        self.assertIn(client_urn.Add("registry").Add("bar"), vfs)