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

Side by Side Diff: sitescripts/extensions/test/test_updateManifests.py

Issue 29589674: Issue 5942 - don't create Gecko update manifests (Closed)
Patch Set: Created Oct. 26, 2017, 8:45 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « sitescripts/extensions/test/sitescripts.ini.template ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # This file is part of the Adblock Plus web scripts, 1 # This file is part of the Adblock Plus web scripts,
2 # Copyright (C) 2006-present eyeo GmbH 2 # Copyright (C) 2006-present eyeo GmbH
3 # 3 #
4 # Adblock Plus is free software: you can redistribute it and/or modify 4 # Adblock Plus is free software: you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License version 3 as 5 # it under the terms of the GNU General Public License version 3 as
6 # published by the Free Software Foundation. 6 # published by the Free Software Foundation.
7 # 7 #
8 # Adblock Plus is distributed in the hope that it will be useful, 8 # Adblock Plus is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of 9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
(...skipping 17 matching lines...) Expand all
28 return tests_dir.join('oracle').join(what).read().strip() 28 return tests_dir.join('oracle').join(what).read().strip()
29 return expected_value_of 29 return expected_value_of
30 30
31 31
32 def test_update_manifests(config_ini, hg_dir, tmpdir, oracle): 32 def test_update_manifests(config_ini, hg_dir, tmpdir, oracle):
33 env = dict(os.environ) 33 env = dict(os.environ)
34 env['SITESCRIPTS_CONFIG'] = str(config_ini) 34 env['SITESCRIPTS_CONFIG'] = str(config_ini)
35 cmd = ['python', '-m', 'sitescripts.extensions.bin.updateUpdateManifests'] 35 cmd = ['python', '-m', 'sitescripts.extensions.bin.updateUpdateManifests']
36 subprocess.check_call(cmd, env=env) 36 subprocess.check_call(cmd, env=env)
37 for filename in ['androidupdates.json', 'androidupdates.xml', 37 for filename in ['androidupdates.json', 'androidupdates.xml',
38 'ieupdate.json', 'updates.json', 'updates.plist']: 38 'ieupdate.json', 'updates.plist']:
39 got = tmpdir.join(filename).read().strip() 39 got = tmpdir.join(filename).read().strip()
40 expect = oracle(filename) 40 expect = oracle(filename)
41 if filename.endswith('.json'): 41 if filename.endswith('.json'):
42 got = json.loads(got) 42 got = json.loads(got)
43 expect = json.loads(expect) 43 expect = json.loads(expect)
44 assert got == expect 44 assert got == expect
OLDNEW
« no previous file with comments | « sitescripts/extensions/test/sitescripts.ini.template ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld