Пример #1
0
 async def testInstallsIPA(self):
     ipafile = make_ipa(self.tmpdir, Fixtures.APP_PATH)
     simulator = await self.assertCreatesSimulator([self.device_type])
     await self.assertInstallsUserApplication(
         simulator.udid,
         ipafile,
         Fixtures.APP_BUNDLE_ID,
     )
     await self.assertEventSuccesful([simulator.udid, 'shutdown'], 'shutdown')
Пример #2
0
 async def testInstallsIPA(self):
     ipafile = make_ipa(self.tmpdir, Fixtures.APP_PATH)
     simulator = await self.assertCreatesSimulator([self.device_type])
     await self.assertInstallsUserApplication(
         simulator.udid,
         ipafile,
         Fixtures.APP_BUNDLE_ID,
     )
     await self.assertEventSuccesful([simulator.udid, 'shutdown'], 'shutdown')
Пример #3
0
 def testInstallsIPA(self):
     tmpdir = tempfile.mkdtemp()
     try:
         ipafile = make_ipa(tmpdir, Fixtures.APP_PATH)
         simulator = self.assertCreatesSimulator([self.device_type])
         self.assertInstallsUserApplication(
             simulator.get_udid(),
             ipafile,
             Fixtures.APP_BUNDLE_ID,
         )
         self.assertEventSuccesful([simulator.get_udid(), 'shutdown'], 'shutdown')
     finally:
         shutil.rmtree(tmpdir, ignore_errors=True)
Пример #4
0
 def testInstallsIPA(self):
     tmpdir = tempfile.mkdtemp()
     try:
         ipafile = make_ipa(tmpdir, Fixtures.APP_PATH)
         simulator = self.assertCreatesSimulator([self.device_type])
         self.assertInstallsUserApplication(
             simulator.get_udid(),
             ipafile,
             Fixtures.APP_BUNDLE_ID,
         )
         self.assertEventSuccesful([simulator.get_udid(), 'shutdown'],
                                   'shutdown')
     finally:
         shutil.rmtree(tmpdir, ignore_errors=True)
Пример #5
0
 def testInstallsUserApplication(self):
     simulator = self.assertCreatesSimulator(['iPhone 6'])
     self.assertEventSuccesful([simulator.get_udid(), 'boot'], 'boot')
     ipafile = make_ipa(self.tmpdir, Fixtures.APP_PATH)
     with self.launchWebserver() as webserver, open(ipafile, 'rb') as ipa:
         response = webserver.post_binary(
             '{}/install'.format(simulator.get_udid()),
             ipa,
             os.path.getsize(ipafile),
         )
         self.assertEqual(response.get('status'), 'success')
     events = self.fbsimctl.run([simulator.get_udid(), 'list_apps'])
     event = events.matching('list_apps', 'discrete')[0]
     bundle_ids = [entry.get('bundle_id') for entry in event.get('subject')]
     return self.assertIn(Fixtures.APP_BUNDLE_ID, bundle_ids)
Пример #6
0
 async def testInstallsUserApplication(self):
     simulator = await self.assertCreatesSimulator(["iPhone 6"])
     await self.assertEventSuccesful([simulator.udid, "boot"], "boot")
     ipafile = make_ipa(self.tmpdir, Fixtures.APP_PATH)
     async with self.launchWebserver() as webserver:
         with open(ipafile, "rb") as ipa:
             response = webserver.post_binary(
                 "{}/install".format(simulator.udid),
                 ipa,
                 os.path.getsize(ipafile),
             )
             self.assertEqual(response.get("status"), "success")
     events = await self.fbsimctl.run([simulator.udid, "list_apps"])
     event = events.matching("list_apps", "discrete")[0]
     bundle_ids = [
         entry.get("bundle").get("bundle_id") for entry in event.get("subject")
     ]
     return self.assertIn(Fixtures.APP_BUNDLE_ID, bundle_ids)
Пример #7
0
 def testInstallsUserApplication(self):
     simulator = self.assertCreatesSimulator(['iPhone 6'])
     self.assertEventSuccesful([simulator.get_udid(), 'boot'], 'boot')
     tmpdir = tempfile.mkdtemp()
     try:
         ipafile = make_ipa(tmpdir, Fixtures.APP_PATH)
         with self.launchWebserver() as webserver, open(ipafile, 'rb') as ipa:
             response = webserver.post_binary(
                 '{}/install'.format(simulator.get_udid()),
                 ipa,
                 os.path.getsize(ipafile),
             )
             self.assertEqual(response.get('status'), 'success')
         events = self.fbsimctl.run([simulator.get_udid(), 'list_apps'])
         event = events.matching('list_apps', 'discrete')[0]
         bundle_ids = [entry.get('bundle_id') for entry in event.get('subject')]
         return self.assertIn(Fixtures.APP_BUNDLE_ID, bundle_ids)
     finally:
         shutil.rmtree(tmpdir, ignore_errors=True)
Пример #8
0
 async def testInstallsUserApplication(self):
     simulator = await self.assertCreatesSimulator(['iPhone 6'])
     await self.assertEventSuccesful([simulator.udid, 'boot'], 'boot')
     ipafile = make_ipa(self.tmpdir, Fixtures.APP_PATH)
     async with self.launchWebserver() as webserver:
         with open(ipafile, 'rb') as ipa:
             response = webserver.post_binary(
                 '{}/install'.format(simulator.udid),
                 ipa,
                 os.path.getsize(ipafile),
             )
             self.assertEqual(response.get('status'), 'success')
     events = await self.fbsimctl.run([simulator.udid, 'list_apps'])
     event = events.matching('list_apps', 'discrete')[0]
     bundle_ids = [
         entry.get('bundle').get('bundle_id')
         for entry
         in event.get('subject')
     ]
     return self.assertIn(Fixtures.APP_BUNDLE_ID, bundle_ids)