summaryrefslogtreecommitdiff
path: root/scripts/manifest_fixer_test.py
diff options
context:
space:
mode:
author Victor Hsieh <victorhsieh@google.com> 2019-01-02 14:50:56 -0800
committer Victor Hsieh <victorhsieh@google.com> 2019-01-03 09:51:11 -0800
commita2c16c1aa0ed81f02ba8ebd8b827fd3c607f5020 (patch)
tree4324d163bb47f54f55fbbcd3b510b73bdf187adf /scripts/manifest_fixer_test.py
parent186c771cb4d0ba556ab0051c6d44e502926f614e (diff)
manifest_fixer: rename to --prefer-code-integrity
During code review, the name change was suggested. Test: local CTS passed Bug: 112037137 Change-Id: I7eb25210afb45c7477b0d606574048a15c9c721d
Diffstat (limited to 'scripts/manifest_fixer_test.py')
-rwxr-xr-xscripts/manifest_fixer_test.py20
1 files changed, 10 insertions, 10 deletions
diff --git a/scripts/manifest_fixer_test.py b/scripts/manifest_fixer_test.py
index a621445b8..edc98cd3a 100755
--- a/scripts/manifest_fixer_test.py
+++ b/scripts/manifest_fixer_test.py
@@ -346,12 +346,12 @@ class AddUsesNonSdkApiTest(unittest.TestCase):
self.assertEqual(output, expected)
-class PreferIntegrityTest(unittest.TestCase):
- """Unit tests for add_prefer_integrity function."""
+class PreferCodeIntegrityTest(unittest.TestCase):
+ """Unit tests for add_prefer_code_integrity function."""
def run_test(self, input_manifest):
doc = minidom.parseString(input_manifest)
- manifest_fixer.add_prefer_integrity(doc)
+ manifest_fixer.add_prefer_code_integrity(doc)
output = StringIO.StringIO()
manifest_fixer.write_xml(output, doc)
return output.getvalue()
@@ -362,23 +362,23 @@ class PreferIntegrityTest(unittest.TestCase):
' <application%s/>\n'
'</manifest>\n')
- def prefer_integrity(self, value):
- return ' android:preferIntegrity="%s"' % value
+ def prefer_code_integrity(self, value):
+ return ' android:preferCodeIntegrity="%s"' % value
def test_manifest_with_undeclared_preference(self):
manifest_input = self.manifest_tmpl % ''
- expected = self.manifest_tmpl % self.prefer_integrity('true')
+ expected = self.manifest_tmpl % self.prefer_code_integrity('true')
output = self.run_test(manifest_input)
self.assertEqual(output, expected)
- def test_manifest_with_prefer_integrity(self):
- manifest_input = self.manifest_tmpl % self.prefer_integrity('true')
+ def test_manifest_with_prefer_code_integrity(self):
+ manifest_input = self.manifest_tmpl % self.prefer_code_integrity('true')
expected = manifest_input
output = self.run_test(manifest_input)
self.assertEqual(output, expected)
- def test_manifest_with_not_prefer_integrity(self):
- manifest_input = self.manifest_tmpl % self.prefer_integrity('false')
+ def test_manifest_with_not_prefer_code_integrity(self):
+ manifest_input = self.manifest_tmpl % self.prefer_code_integrity('false')
self.assertRaises(RuntimeError, self.run_test, manifest_input)
if __name__ == '__main__':