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

Delta Between Two Patch Sets: tests/test_packagerEdge.py

Issue 29501558: Issue 5383 - Add tests for the Chrome and Firefox packagers (Closed)
Left Patch Set: NO CHANGE Rebasing against #4720 @ PS 4 Created Oct. 18, 2017, 11:18 a.m.
Right Patch Set: Addressing Vasily's comments Created Oct. 22, 2017, 11:11 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « tests/metadata.gecko ('k') | tests/test_packagerWebExt.py » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
1 # This Source Code Form is subject to the terms of the Mozilla Public 1 # This Source Code Form is subject to the terms of the Mozilla Public
2 # License, v. 2.0. If a copy of the MPL was not distributed with this 2 # License, v. 2.0. If a copy of the MPL was not distributed with this
3 # file, You can obtain one at http://mozilla.org/MPL/2.0/. 3 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
4 4
5 import xml.etree.ElementTree as ET
6
5 import pytest 7 import pytest
6
7 import xml.etree.ElementTree as ET
8 8
9 from buildtools import packager, packagerEdge 9 from buildtools import packager, packagerEdge
10 10
11 11
12 @pytest.fixture 12 @pytest.fixture
13 def files(): 13 def files():
14 """Minimal Files() for testing blockmap.""" 14 """Minimal Files() for testing blockmap."""
15 str500 = b''.join(chr(i % 200 + 30) for i in range(500)) 15 str500 = b''.join(chr(i % 200 + 30) for i in range(500))
16 files = packager.Files(set(), set()) 16 files = packager.Files(set(), set())
17 files['Extension/foo.xml'] = str500 17 files['Extension/foo.xml'] = str500
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 'js': 'application/javascript', 78 'js': 'application/javascript',
79 'json': 'application/json', 79 'json': 'application/json',
80 'otf': 'application/octet-stream', 80 'otf': 'application/octet-stream',
81 'png': 'image/png', 81 'png': 'image/png',
82 'xml': 'application/xml' 82 'xml': 'application/xml'
83 } 83 }
84 assert ctm_dict['overrides'] == { 84 assert ctm_dict['overrides'] == {
85 '/AppxBlockMap.xml': 'application/vnd.ms-appx.blockmap+xml', 85 '/AppxBlockMap.xml': 'application/vnd.ms-appx.blockmap+xml',
86 '/AppxManifest.xml': 'application/vnd.ms-appx.manifest+xml' 86 '/AppxManifest.xml': 'application/vnd.ms-appx.manifest+xml'
87 } 87 }
LEFTRIGHT

Powered by Google App Engine
This is Rietveld