def test_get_file_format():
    fformat = get_file_format('data/examples/luis/demo-restaurants.json')
    assert (fformat == 'json')
    fformat = get_file_format('data/examples')
    assert (fformat == 'json')
    fformat = get_file_format('examples/restaurantbot/data/nlu.md')
    assert (fformat == 'md')
    with pytest.raises(AttributeError):
        get_file_format('path-does-not-exists')
    with pytest.raises(AttributeError):
        get_file_format(None)
def test_get_file_format():
    fformat = get_file_format('data/examples/luis/demo-restaurants.json')
    assert (fformat == 'json')
    fformat = get_file_format('data/examples')
    assert (fformat == 'json')
    fformat = get_file_format('examples/restaurantbot/data/nlu.md')
    assert (fformat == 'md')
    with pytest.raises(AttributeError):
        get_file_format('path-does-not-exists')
    with pytest.raises(AttributeError):
        get_file_format(None)