'Test jsonify with uuid.UUID types'

def test_jsonify_uuid_types(self, app, client):

    test_uuid = uuid.UUID(bytes=('\xde\xad\xbe\xef' * 4))
    url = '/uuid_test'
    app.add_url_rule(url, url, (lambda : flask.jsonify(x=test_uuid)))
    rv = client.get(url)
    rv_x = flask.json.loads(rv.data)['x']
    assert (rv_x == str(test_uuid))
    rv_uuid = uuid.UUID(rv_x)
    assert (rv_uuid == test_uuid)
