refactor dnscrypt parse
add test
This commit is contained in:
parent
ee37b9e95e
commit
a53b9c7a8e
10 changed files with 608 additions and 540 deletions
19
testing/test_gfwlist_to_dns.py
Normal file
19
testing/test_gfwlist_to_dns.py
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
import unittest
|
||||
|
||||
from gfwlist_to_dns import get_dnsmasq_text, get_smartdns_domain_set
|
||||
|
||||
|
||||
class MyTestCase(unittest.TestCase):
|
||||
def test_get_dnsmasq_text(self):
|
||||
dnsmasq_text = get_dnsmasq_text()
|
||||
# print(dnsmasq_text)
|
||||
self.assertIsInstance(dnsmasq_text, str)
|
||||
|
||||
def test_get_smartdns_domain_set(self):
|
||||
domain_set = get_smartdns_domain_set()
|
||||
# print(domain_set)
|
||||
self.assertIsInstance(domain_set, str)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
Loading…
Add table
Add a link
Reference in a new issue