1 # -*- coding: utf-8 -*-
4 import jben
.dict_downloader
as dd
7 class Test(unittest
.TestCase
):
9 def test_get_mirror_list_offline(self
):
10 ml
= dd
.get_mirror_list(from_inet
=False)
11 self
.assertTrue(len(ml
) > 0)
13 def test_get_mirror_list_online(self
):
14 ml
= dd
.get_mirror_list(from_inet
=True)
15 self
.assertTrue(len(ml
) > 0)
17 class TestINet(unittest
.TestCase
):
19 """Tests to be run sparingly since they rely on Internet servers."""
21 def test_download_dict(self
):
23 dd
.download_dict(fname
)
24 # Maybe add checking for file existance afterwards?
25 # For now, if the function runs without raising an exception,
29 if __name__
== "__main__":