Пример #1
0
 def test_package_name(self):
     with self.android_binary() as android_binary:
         key = self.FakeKeystore()
         target = android_binary
         self.assertEquals(
             SignApkTask.signed_package_name(target, key.build_type), "org.pantsbuild.example.hello.debug.signed.apk"
         )
Пример #2
0
 def test_package_name(self):
     with self.android_binary() as android_binary:
         key = self.FakeKeystore()
         target = android_binary
         self.assertEquals(
             SignApkTask.signed_package_name(target, key.build_type),
             'binary.debug.signed.apk')
Пример #3
0
 def test_setup_default_config_no_permission(self):
     with temporary_file() as temp:
         os.chmod(temp.name, 0o400)
         with self.assertRaises(TaskError):
             SignApkTask.setup_default_config(temp.name)
Пример #4
0
 def test_setup_default_config(self):
     with temporary_dir() as temp:
         default_config = os.path.join(temp, "default_config.ini")
         SignApkTask.setup_default_config(default_config)
         self.assertTrue(os.path.isfile(default_config))
Пример #5
0
 def test_setup_default_config_no_permission(self):
   with temporary_file() as temp:
     os.chmod(temp.name, 0o400)
     with self.assertRaises(TaskError):
       SignApkTask.setup_default_config(temp.name)
Пример #6
0
 def test_setup_default_config(self):
   with temporary_dir() as temp:
     default_config = os.path.join(temp, 'default_config.ini')
     SignApkTask.setup_default_config(default_config)
     self.assertTrue(os.path.isfile(default_config))
Пример #7
0
 def test_package_name(self):
   with self.android_binary() as android_binary:
     key = self.FakeKeystore()
     target = android_binary
     self.assertEquals(SignApkTask.signed_package_name(target, key.build_type),
                       'binary.debug.signed.apk')