'Test L{dns.Charstr} encode and decode.'

def test_Charstr(self):

    for n in self.names:
        f = BytesIO()
        dns.Charstr(n).encode(f)
        f.seek(0, 0)
        result = dns.Charstr()
        result.decode(f)
        self.assertEqual(result.string, n)
