<commit_before>import unittest
import recurly

class RecurlyExceptionTests(unittest.TestCase):
    def test_error_printable(self):
        """ Make sure __str__/__unicode__ works correctly in Python 2/3"""
        str(recurly.UnauthorizedError('recurly.API_KEY not set'))<commit_msg>Construct a test for the ValidationError unprintable issue<commit_after>import unittest
import recurly

class RecurlyExceptionTests(unittest.TestCase):
    def test_error_printable(self):
        """ Make sure __str__/__unicode__ works correctly in Python 2/3"""
        str(recurly.UnauthorizedError('recurly.API_KEY not set'))

    def test_validationerror_printable(self):
        """ Make sure __str__/__unicode__ works correctly in Python 2/3"""
        error = recurly.ValidationError.Suberror('field', 'symbol', 'message')
        suberrors = dict()
        suberrors['field'] = error
        validation_error = recurly.ValidationError('')
        validation_error.__dict__['errors'] = suberrors
        str(validation_error)
{'fraction_non_alphanumeric': 0.09655172413793103, 'fraction_numerical': 0.005911330049261084, 'mean_word_length': 4.237113402061856, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3476106', 'n_tokens_mistral': 290, 'n_tokens_neox': 282, 'n_words': 67}