'Test we can get subfields of the client.'

def testClientSubfieldGet(self):

    fd = aff4.FACTORY.Create('C.0000000000000000', aff4_grr.VFSGRRClient, token=self.token)
    kb = fd.Schema.KNOWLEDGE_BASE()
    for i in range(5):
        kb.users.Append(rdf_client.User(username=('user%s' % i)))
    fd.Set(kb)
    fd.Close()
    fd = aff4.FACTORY.Open('C.0000000000000000', aff4_grr.VFSGRRClient, token=self.token)
    for (i, user) in enumerate(fd.Get(fd.Schema.KNOWLEDGE_BASE).users):
        self.assertEqual(user.username, ('user%s' % i))
