diff --git a/cdp/wallet.py b/cdp/wallet.py index 1b1e9f2..9531e86 100644 --- a/cdp/wallet.py +++ b/cdp/wallet.py @@ -18,13 +18,13 @@ from cdp.address import Address from cdp.balance_map import BalanceMap from cdp.cdp import Cdp -from cdp.client.models.create_wallet_webhook_request import CreateWalletWebhookRequest from cdp.client.models.address import Address as AddressModel from cdp.client.models.create_address_request import CreateAddressRequest from cdp.client.models.create_wallet_request import ( CreateWalletRequest, CreateWalletRequestWallet, ) +from cdp.client.models.create_wallet_webhook_request import CreateWalletWebhookRequest from cdp.client.models.wallet import Wallet as WalletModel from cdp.client.models.wallet_list import WalletList from cdp.contract_invocation import ContractInvocation diff --git a/tests/factories/webhook_factory.py b/tests/factories/webhook_factory.py index 7729964..8c75150 100644 --- a/tests/factories/webhook_factory.py +++ b/tests/factories/webhook_factory.py @@ -1,10 +1,11 @@ import pytest -from cdp.webhook import Webhook, WebhookModel, WebhookEventType + +from cdp.webhook import Webhook, WebhookEventType, WebhookModel + @pytest.fixture def webhook_factory(): """Create and return a factory for Webhook fixtures.""" - def _create_webhook( webhook_id="webhook-123", network_id="base-sepolia", diff --git a/tests/test_wallet.py b/tests/test_wallet.py index 3b25ef2..c783ac3 100644 --- a/tests/test_wallet.py +++ b/tests/test_wallet.py @@ -644,4 +644,4 @@ def test_create_webhook(mock_api_clients, wallet_factory, webhook_factory): assert isinstance(webhook, Webhook) # Additional assertions to check the returned webhook object - assert webhook.notification_uri == notification_uri \ No newline at end of file + assert webhook.notification_uri == notification_uri diff --git a/tests/test_webhook.py b/tests/test_webhook.py index d5267c5..4bf5272 100644 --- a/tests/test_webhook.py +++ b/tests/test_webhook.py @@ -1,7 +1,8 @@ from unittest.mock import patch + from cdp.client.models.create_webhook_request import CreateWebhookRequest from cdp.client.models.update_webhook_request import UpdateWebhookRequest -from cdp.client.models.webhook import WebhookEventType, WebhookEventTypeFilter, WebhookEventFilter +from cdp.client.models.webhook import WebhookEventFilter, WebhookEventType, WebhookEventTypeFilter from cdp.webhook import Webhook, WebhookModel @@ -43,7 +44,6 @@ def test_webhook_creation(mock_api_clients, webhook_factory): @patch("cdp.Cdp.api_clients") def test_webhook_delete(mock_api_clients): """Test Webhook delete method.""" - webhook_id = "webhook-123" Webhook.delete(webhook_id)