def test_island(): json = open('test/example.json').read() if os.path.exists('elevation.png'): os.unlink('elevation.png') island.generate(json) assert os.path.exists('elevation.png') os.unlink('elevation.png')
def post_render(): now = time.strftime("%y%m%d%H%M%S") renderspec = request.json renderspec['filename'] = now + '.png' island.generate(json.dumps(renderspec)) return now