def poll(test: TestCase, transaction_id: str, expected_status: str, app: App, user_handle: str, eth_private_key: str): payload = { "user_handle": user_handle, "search_filters": { 'page': 1, 'per_page': 1, "transaction_id": transaction_id, } } response = User.getTransactions(app, payload, eth_private_key) status = response["transactions"][0]["status"] while status == "queued" or status == "pending": time.sleep(30) response = User.getTransactions(app, payload, eth_private_key) status = response["transactions"][0]["status"] test.assertEqual(status, expected_status)
def test_get_transactions_200_deprecated(self): payload = { "user_handle": user_handle, "search_filters": { 'page': 1, 'per_page': 1 } } with self.assertWarns(DeprecationWarning): response = User.getTransactions(app, payload, eth_private_key) self.assertTrue(response["success"]) self.assertEqual(len(response["transactions"]), 1) self.assertEqual(response["transactions"][0]["processing_type"], ProcessingTypes.STANDARD_ACH)