def tearDown(self): if is_device_rooted(): # Wait until the app was started successful time.sleep(6) self.assertTrue(test_utils.is_app_running(PACKAGE_NAME)) test_utils.stop_app(PACKAGE_NAME)
def tearDown(self): self.assertTrue(os.path.exists(PROJECT_DIR)) # Wait for termination of the app installation before checking time.sleep(6) self.assertTrue(test_utils.is_app_running(PACKAGE_NAME)) if is_device_rooted(): test_utils.stop_app(PACKAGE_NAME) os.chdir(TESTS_DIR) test_utils.remove_directories_if_exist([PROJECT_DIR])
def setUp(self): """ Explicitly remove previous test projects, to be sure a new one is created. """ os.chdir(TESTS_DIR) if is_device_rooted(): test_utils.stop_app(PACKAGE_NAME) self.assertFalse(test_utils.is_app_running(PACKAGE_NAME)) test_utils.remove_directories_if_exist([PROJECT_DIR]) self.assertFalse(os.path.exists(PROJECT_DIR))
def test_examples(self): """Test deploying all examples.""" for example_name in self.conf.sections(): os.chdir(TESTS_DIR) app_name = example_name + create_example.APP_NAME_SUFFIX package_name = "%s.%s" % (create_example.DOMAIN, app_name) project_dir = os.path.join(TESTS_DIR, app_name) test_utils.remove_directories_if_exist([project_dir]) self.assertFalse(os.path.exists(project_dir)) if is_device_rooted(): test_utils.stop_app(package_name) self.assertFalse(test_utils.is_app_running(package_name)) create_example.create_example([example_name]) self.assertTrue(os.path.exists(project_dir)) complete_deploy.complete_deploy() time.sleep(8) self.assertTrue(test_utils.is_app_running(package_name)) if is_device_rooted(): test_utils.stop_app(package_name) test_utils.remove_directories_if_exist([project_dir])
def tearDown(self): # Wait for termination of the app installation before checking time.sleep(6) self.assertTrue(test_utils.is_app_running(PACKAGE_NAME)) if is_device_rooted(): test_utils.stop_app(PACKAGE_NAME)
def setUp(self): if is_device_rooted(): self.assertFalse(test_utils.is_app_running(PACKAGE_NAME))