feat: decline pending action
This commit is contained in:
@@ -61,6 +61,19 @@ async def test_draft_message_creates_pending_action():
|
||||
assert pending["id"] in registry.pending_actions
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_decline_pending_action_removes_without_sending():
|
||||
registry = ToolRegistry(FakeUEX())
|
||||
result = await registry.draft_negotiation_message(hash="abc", message="Would you take 4500 UEC?")
|
||||
action_id = result["pending_action"]["id"]
|
||||
|
||||
declined = await registry.decline(action_id)
|
||||
|
||||
assert declined["declined"] is True
|
||||
assert declined["pending_action"]["id"] == action_id
|
||||
assert action_id not in registry.pending_actions
|
||||
|
||||
|
||||
def test_uex_client_uses_bearer_and_secret_headers():
|
||||
client = UEXClient("https://api.uexcorp.space/2.0", secret_key="secret", bearer_token="bearer")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user