예제 #1
0
def test_valid_feature():
    good_input = {
        'gsx$long': {
            '$t': '150.44'
        },
        'gsx$lat': {
            '$t': '42.524'
        },
        'gsx$startyear': {
            '$t': '1918'
        }
    }
    assert export.valid_feature(good_input)
예제 #2
0
def test_valid_feature():
    good_input = {
        'gsx$long': {
            '$t': '150.44'
        },
        'gsx$lat': {
            '$t': '42.524'
        },
        'gsx$startyear': {
            '$t': '1918'
        }
    }
    assert export.valid_feature(good_input)
예제 #3
0
def test_valid_feature_2():
    bad_input = {
        'gsx$long': {
            '$fft': '150.44'
        },
        'gsx$ldfasdfasdat': {
            '$t': '42.5df24'
        },
        'gsxasfyear': {
            '$t': '1918'
        }
    }
    try:
        assert export.valid_feature(bad_input)
    except KeyError:
        assert True
예제 #4
0
def test_valid_feature_2():
    bad_input = {
        'gsx$long': {
            '$fft': '150.44'
        },
        'gsx$ldfasdfasdat': {
            '$t': '42.5df24'
        },
        'gsxasfyear': {
            '$t': '1918'
        }
    }
    try:
        assert export.valid_feature(bad_input)
    except KeyError:
        assert True