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)
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