'Test that the string generated by an Avro Schema object
is, in fact, a valid Avro schema.'

def test_valid_cast_to_string_after_parse(self):

    print_test_name('TEST    CAST    TO    STRING    AFTER    PARSE')
    correct = 0
    for example in VALID_EXAMPLES:
        schema_data = schema.parse(example.schema_string)
        schema.parse(str(schema_data))
        correct += 1
    fail_msg = ('Cast    to    string    success    on    %d    out    of    %d    schemas' % (correct, len(VALID_EXAMPLES)))
    self.assertEqual(correct, len(VALID_EXAMPLES), fail_msg)
