예제 #1
0
 def test_metadata(self):
     tilestore = MBTilesTileStore(sqlite3.connect(':memory:'))
     tilestore.put_one(Tile(TileCoord(1, 0, 0)))
     tilestore.put_one(Tile(TileCoord(2, 0, 0)))
     tilestore.set_metadata_zooms()
     self.assertEqual(int(tilestore.metadata['minzoom']), 1)
     self.assertEqual(int(tilestore.metadata['maxzoom']), 2)
     self.assertEqual(sorted(tilestore.metadata.itervalues()), ['1', '2'])
     self.assertEqual(sorted(tilestore.metadata.keys()), ['maxzoom', 'minzoom'])
예제 #2
0
 def test_metadata(self) -> None:
     tilestore = MBTilesTileStore(sqlite3.connect(":memory:"))
     tilestore.put_one(Tile(TileCoord(1, 0, 0)))
     tilestore.put_one(Tile(TileCoord(2, 0, 0)))
     tilestore.set_metadata_zooms()
     self.assertEqual(int(tilestore.metadata["minzoom"]), 1)
     self.assertEqual(int(tilestore.metadata["maxzoom"]), 2)
     self.assertEqual(sorted(tilestore.metadata.itervalues()), ["1", "2"])
     self.assertEqual(sorted(tilestore.metadata.keys()), ["maxzoom", "minzoom"])
예제 #3
0
 def test_metadata(self):
     tilestore = MBTilesTileStore(sqlite3.connect(':memory:'))
     tilestore.put_one(Tile(TileCoord(1, 0, 0)))
     tilestore.put_one(Tile(TileCoord(2, 0, 0)))
     tilestore.set_metadata_zooms()
     self.assertEqual(int(tilestore.metadata['minzoom']), 1)
     self.assertEqual(int(tilestore.metadata['maxzoom']), 2)
     self.assertEqual(sorted(tilestore.metadata.itervalues()), ['1', '2'])
     self.assertEqual(sorted(tilestore.metadata.keys()),
                      ['maxzoom', 'minzoom'])