LEFT | RIGHT |
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 Loading... |
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 } |
LEFT | RIGHT |