OLD | NEW |
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 difflib | 5 import difflib |
6 import json | 6 import json |
7 import os | 7 import os |
8 import re | 8 import re |
9 import shutil | 9 import shutil |
10 import zipfile | 10 import zipfile |
(...skipping 14 matching lines...) Expand all Loading... |
25 'message': 'Ensuring dict-copy from modules for $domain$', | 25 'message': 'Ensuring dict-copy from modules for $domain$', |
26 'description': 'test description', | 26 'description': 'test description', |
27 'placeholders': {'content': '$1', 'example': 'www.adblockplus.org'}, | 27 'placeholders': {'content': '$1', 'example': 'www.adblockplus.org'}, |
28 }, | 28 }, |
29 } | 29 } |
30 | 30 |
31 ALL_LANGUAGES = ['en_US', 'de', 'it'] | 31 ALL_LANGUAGES = ['en_US', 'de', 'it'] |
32 | 32 |
33 MESSAGES_EN_US = json.dumps({ | 33 MESSAGES_EN_US = json.dumps({ |
34 'name': {'message': 'Adblock Plus'}, | 34 'name': {'message': 'Adblock Plus'}, |
35 'name_devbuild': {'message': 'devbuild-marker'}, | 35 'name_devbuild': {'message': 'Adblock Plus development build'}, |
36 'description': { | 36 'description': { |
37 'message': 'Adblock Plus is the most popular ad blocker ever, ' | 37 'message': 'Adblock Plus is the most popular ad blocker ever, ' |
38 'and also supports websites by not blocking ' | 38 'and also supports websites by not blocking ' |
39 'unobstrusive ads by default (configurable).', | 39 'unobstrusive ads by default (configurable).', |
40 }, | 40 }, |
41 }) | 41 }) |
42 | 42 |
43 | 43 |
44 class Content(object): | 44 class Content(object): |
45 """Base class for a unified ZipFile / Directory interface. | 45 """Base class for a unified ZipFile / Directory interface. |
(...skipping 449 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
495 expected = os.path.join( | 495 expected = os.path.join( |
496 os.path.dirname(__file__), | 496 os.path.dirname(__file__), |
497 'expecteddata', | 497 'expecteddata', |
498 filename.format(name, ext), | 498 filename.format(name, ext), |
499 ) | 499 ) |
500 | 500 |
501 assert_manifest_content( | 501 assert_manifest_content( |
502 package.read(os.path.join(folder, '{}.{}'.format(name, ext))), | 502 package.read(os.path.join(folder, '{}.{}'.format(name, ext))), |
503 expected, | 503 expected, |
504 ) | 504 ) |
OLD | NEW |