Index: sitescripts/subscriptions/test/test_updateMalwareDomainsList.py |
diff --git a/sitescripts/subscriptions/test/test_updateMalwareDomainsList.py b/sitescripts/subscriptions/test/test_updateMalwareDomainsList.py |
index bd1dd2521aba2c12f550d3dc965c67a78b150386..e0939649ad08aa3e35da86710ba2faa77442c788 100644 |
--- a/sitescripts/subscriptions/test/test_updateMalwareDomainsList.py |
+++ b/sitescripts/subscriptions/test/test_updateMalwareDomainsList.py |
@@ -58,7 +58,8 @@ def urlopen(mocker): |
if url.startswith('good'): |
zf_data = io.BytesIO() |
with zipfile.ZipFile(zf_data, 'w') as zf: |
- zf.writestr('justdomains', 'success\n') |
+ idna_urls = ['xn--xhq02ykwbp4a.cn', 'xn--fiq80yua78t.tw'] |
+ zf.writestr('justdomains', '\n'.join(idna_urls) + '\n') |
return io.BytesIO(zf_data.getvalue()) |
if url.startswith('bad'): |
raise urllib2.HTTPError('Bad', '42', 'No good', [], None) |
@@ -73,7 +74,9 @@ def test_good(md_repo): |
main() |
subprocess.check_call(['hg', 'up'], cwd=md_repo.strpath) |
result = md_repo.join('malwaredomains_full.txt').read() |
- assert 'success' in result |
+ puny_urls = ['.cn-w48dx81cufdl6b', '.tw-u68dw51cgbz81a'] |
+ for url in puny_urls: |
+ assert url in result |
def test_bad(md_repo, config): |