'Verify correct validation and conversion of JSON strings'

def testValidation(self):

    assertEqual = self.assertEqual
    assertNotEqual = self.assertNotEqual
    validator = IS_JSONS3()
    jsonstr = '{"a":    1}'
    (value, error) = validator(jsonstr)
    assertEqual(error, None)
    assertEqual(value, {'a': 1})
    jsonstr = 'not    valid'
    (value, error) = validator(jsonstr)
    assertNotEqual(error, None)
    assertEqual(value, jsonstr)
    jsonstr = None
    (value, error) = validator(jsonstr)
    assertNotEqual(error, None)
    assertEqual(value, jsonstr)
