def test_url_data_format():
    data = '\n    {\n      "rasa_nlu_data": {\n        "entity_synonyms": [\n          {\n            "value": "nyc",\n            "synonyms": ["New York City", "nyc", "the big apple"]\n          }\n        ],\n        "common_examples" : [\n          {\n            "text": "show me flights to New York City",\n            "intent": "unk",\n            "entities": [\n              {\n                "entity": "destination",\n                "start": 19,\n                "end": 32,\n                "value": "NYC"\n              }\n            ]\n          }\n        ]\n      }\n    }'
    fname = io_utils.create_temporary_file(data.encode('utf-8'), suffix='_tmp_training_data.json', mode='w+b')
    data = io_utils.read_json_file(fname)
    assert (data is not None)
    validate_rasa_nlu_data(data)
def test_url_data_format():
    data = '\n    {\n      "rasa_nlu_data": {\n        "entity_synonyms": [\n          {\n            "value": "nyc",\n            "synonyms": ["New York City", "nyc", "the big apple"]\n          }\n        ],\n        "common_examples" : [\n          {\n            "text": "show me flights to New York City",\n            "intent": "unk",\n            "entities": [\n              {\n                "entity": "destination",\n                "start": 19,\n                "end": 32,\n                "value": "NYC"\n              }\n            ]\n          }\n        ]\n      }\n    }'
    fname = io_utils.create_temporary_file(data.encode('utf-8'), suffix='_tmp_training_data.json', mode='w+b')
    data = io_utils.read_json_file(fname)
    assert (data is not None)
    validate_rasa_nlu_data(data)