当前位置: 首页>>代码示例>>Python>>正文


Python AppurifyClient.main方法代码示例

本文整理汇总了Python中appurify.client.AppurifyClient.main方法的典型用法代码示例。如果您正苦于以下问题:Python AppurifyClient.main方法的具体用法?Python AppurifyClient.main怎么用?Python AppurifyClient.main使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在appurify.client.AppurifyClient的用法示例。


在下文中一共展示了AppurifyClient.main方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: testPollTimeoutCode

# 需要导入模块: from appurify.client import AppurifyClient [as 别名]
# 或者: from appurify.client.AppurifyClient import main [as 别名]
 def testPollTimeoutCode(self):
     mockRequestGet.count = -20
     client = AppurifyClient(api_key="test_key", api_secret="test_secret", test_type="ios_webrobot", 
         app_src=None, 
         test_src=None,
         url="www.yahoo.com",
         timeout_sec=0.2,
         poll_every=0.1)
     result_code = client.main()
     self.assertEqual(result_code, 3, "Main should execute and return error code")
开发者ID:BlaineAtAffirm,项目名称:appurify-python,代码行数:12,代码来源:test_client.py

示例2: testDefaultPollTimeoutCode

# 需要导入模块: from appurify.client import AppurifyClient [as 别名]
# 或者: from appurify.client.AppurifyClient import main [as 别名]
 def testDefaultPollTimeoutCode(self):
     old_env = os.environ.get('APPURIFY_API_TIMEOUT', None)
     try:
         os.environ['APPURIFY_API_TIMEOUT'] = '0.2'
         mockRequestGet.count = -20
         client = AppurifyClient(access_token="authenticated", poll_every=0.1)
         result_code = client.main()
         self.assertEqual(result_code, 1, "Main should execute and return error code with default timeout")
     finally:
         if old_env:
             os.environ['APPURIFY_API_TIMEOUT'] = str(old_env)
开发者ID:krohling,项目名称:appurify-python,代码行数:13,代码来源:test_client.py

示例3: testMainPass

# 需要导入模块: from appurify.client import AppurifyClient [as 别名]
# 或者: from appurify.client.AppurifyClient import main [as 别名]
 def testMainPass(self):
     mockRequestGet.count = 0
     mockRequestGet.passes = 2
     mockRequestGet.fails = 0
     mockRequestGet.pass_val = True
     client = AppurifyClient(api_key="test_key", api_secret="test_secret", test_type="uiautomation", 
                             app_src=__file__, app_src_type='raw', 
                             test_src=__file__, test_src_type='raw',
                             timeout_sec=2, poll_every=0.1)
     result_code = client.main()
     self.assertEqual(result_code, 0, "Main should execute and return pass code")
开发者ID:krohling,项目名称:appurify-python,代码行数:13,代码来源:test_client.py

示例4: main

# 需要导入模块: from appurify.client import AppurifyClient [as 别名]
# 或者: from appurify.client.AppurifyClient import main [as 别名]
def main():
    """ main program
    """
    for i in xrange(1,len(sys.argv)):
        print "File: %s"%sys.argv[i]

    params = {}
    if (len(sys.argv)>0):
        params =  parse_input(sys.argv[1])
    # print params
    client = AppurifyClient(**params)
    sys.exit(client.main())
开发者ID:appurify,项目名称:ibm,代码行数:14,代码来源:appurify_start.py

示例5: testMainFail

# 需要导入模块: from appurify.client import AppurifyClient [as 别名]
# 或者: from appurify.client.AppurifyClient import main [as 别名]
 def testMainFail(self):
     mockRequestGet.count = 0
     mockRequestGet.passes = 1
     mockRequestGet.fails = 1
     mockRequestGet.exception = 0
     mockRequestGet.pass_val = False
     client = AppurifyClient(api_key="test_key", api_secret="test_secret", test_type="uiautomation", 
                             app_src=__file__, app_src_type='raw', 
                             test_src=__file__, test_src_type='raw',
                             timeout_sec=2, poll_every=0.1, device_type_id="137")
     result_code = client.main()
     self.assertEqual(result_code, 1, "Main should execute and return fail code")
开发者ID:appurify,项目名称:appurify-python,代码行数:14,代码来源:test_client.py

示例6: testMainPassUrl

# 需要导入模块: from appurify.client import AppurifyClient [as 别名]
# 或者: from appurify.client.AppurifyClient import main [as 别名]
 def testMainPassUrl(self):
     mockRequestGet.count = 0
     mockRequestGet.passes = 2
     mockRequestGet.fails = 0
     mockRequestGet.pass_val = True
     client = AppurifyClient(api_key="test_key", api_secret="test_secret", test_type="ios_webrobot", 
                             app_src=None, 
                             test_src=None,
                             url="www.yahoo.com",
                             timeout_sec=2, poll_every=0.1)
     result_code = client.main()
     self.assertEqual(result_code, 0, "Main should execute and return pass code")
开发者ID:krohling,项目名称:appurify-python,代码行数:14,代码来源:test_client.py

示例7: testDefaultPollTimeoutCode

# 需要导入模块: from appurify.client import AppurifyClient [as 别名]
# 或者: from appurify.client.AppurifyClient import main [as 别名]
 def testDefaultPollTimeoutCode(self):
     old_env = os.environ.get('APPURIFY_API_TIMEOUT', None)
     try:
         os.environ['APPURIFY_API_TIMEOUT'] = '0.2'
         mockRequestGet.count = -20
         client = AppurifyClient(api_key="test_key", api_secret="test_secret", test_type="ios_webrobot", 
                         app_src=None, 
                         test_src=None,
                         url="www.yahoo.com",
                         poll_every=0.1)
         result_code = client.main()
         self.assertEqual(result_code, 3, "Main should execute and return error code with default timeout")
     finally:
         if old_env:
             os.environ['APPURIFY_API_TIMEOUT'] = str(old_env)
开发者ID:BlaineAtAffirm,项目名称:appurify-python,代码行数:17,代码来源:test_client.py

示例8: testPollTimeoutCode

# 需要导入模块: from appurify.client import AppurifyClient [as 别名]
# 或者: from appurify.client.AppurifyClient import main [as 别名]
 def testPollTimeoutCode(self):
     mockRequestGet.count = -20
     client = AppurifyClient(access_token="authenticated", timeout_sec=0.2, poll_every=0.1)
     result_code = client.main()
     self.assertEqual(result_code, 1, "Main should execute and return error code")
开发者ID:krohling,项目名称:appurify-python,代码行数:7,代码来源:test_client.py


注:本文中的appurify.client.AppurifyClient.main方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。