Exemplo n.º 1
0
 def testGetExceptionExitCode(self):
     mockRequestGet.count = -20
     client = AppurifyClient(access_token="authenticated", timeout_sec=0.2, poll_every=0.1)
     self.assertEqual(client.getExceptionExitCode([{"exception": "4007: Error installing the app: file does not contain AndroidManifest.xml\n (1)"}]), 5, "Should return correct exit code for matching exception")
     self.assertEqual(client.getExceptionExitCode([{"exception": "-9999: no match anything"}]), 7, "Should return correct exit code for no exception")
Exemplo n.º 2
0
 def testGetExceptionExitCode(self):
     mockRequestGet.count = -20
     
     client = AppurifyClient(access_token="authenticated", timeout_sec=0.2, poll_every=0.1, device_type_id="137")
     self.assertEqual(client.getExceptionExitCode([{"exception": "4007: Error installing the app: file does not contain AndroidManifest.xml\n (1)"}]), EXIT_CODE_APP_INSTALL_FAILED, "Should return correct exit code for matching exception")
     self.assertEqual(client.getExceptionExitCode([{"exception": "-9999: no match anything"}]), EXIT_CODE_OTHER_EXCEPTION, "Should return correct exit code for no exception")