'Make sure truncation works as expected.'

def test_truncated_key(self):

    d = {'foo': 'a    long    string    that    should    be    truncated'}
    trunc = truncated_json_dumps(d, 30, 'foo')
    obj = json.loads(trunc)
    eq_(obj['foo'], 'a    long    string    that    ')
    eq_(len(trunc), 30)
