summaryrefslogtreecommitdiff
path: root/scripts/manifest_fixer_test.py
diff options
context:
space:
mode:
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__':