Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: sitescripts/subscriptions/test/test_updateMalwareDomainsList.py

Issue 29821558: Issue #6707 - Make the generated malware domain filter list encode domains as Punycode (Closed)
Patch Set: Created July 3, 2018, 3:50 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« .gitignore ('K') | « sitescripts/subscriptions/bin/updateMalwareDomainsList.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..e63bc5267e461277756e66826b5e2cfeff24a718 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_url = 'xn--xhq02ykwbp4a.cn\n'
Vasily Kuznetsov 2018/07/03 16:01:52 I think it would make sense to have 2 domains in t
Tudor Avram 2018/07/06 11:53:16 Done.
+ zf.writestr('justdomains', idna_url)
return io.BytesIO(zf_data.getvalue())
if url.startswith('bad'):
raise urllib2.HTTPError('Bad', '42', 'No good', [], None)
@@ -73,7 +74,7 @@ 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
+ assert '.cn-w48dx81cufdl6b' in result
def test_bad(md_repo, config):
« .gitignore ('K') | « sitescripts/subscriptions/bin/updateMalwareDomainsList.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld