mirror of
https://github.com/pyecharts/pyecharts.git
synced 2026-01-25 17:06:27 +00:00
* ✨ introduce shape only geojson shapes * 💚 fix broken unit test * Fix: test * Format: code
25 lines
677 B
Python
25 lines
677 B
Python
import os
|
|
from unittest.mock import patch
|
|
|
|
from nose.tools import eq_
|
|
|
|
from pyecharts.datasets import EXTRA, register_url
|
|
|
|
|
|
@patch("pyecharts.datasets.urllib.request.urlopen")
|
|
def test_register_url(fake):
|
|
current_path = os.path.dirname(__file__)
|
|
with open(
|
|
os.path.join(current_path, "fixtures", "registry.json"), encoding="utf8"
|
|
) as f:
|
|
fake.return_value = f
|
|
register_url("fake_url")
|
|
eq_(
|
|
EXTRA,
|
|
{
|
|
"https://echarts-maps.github.io/echarts-china-cities-js/js/": {
|
|
"安庆": ["shape-with-internal-borders/an1_hui1_an1_qing4", "js"]
|
|
}
|
|
},
|
|
)
|