Skip to content

Commit 4dedc2f

Browse files
authored
feat(client): add action_output contract output type (#331) (#332)
1 parent 8cd0e6a commit 4dedc2f

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

pyoaev/contracts/contract_config.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ class ContractFieldKey(str, Enum):
4040

4141
class ContractOutputType(str, Enum):
4242
Text: str = "text"
43+
ActionOutput: str = "action_output"
4344
Number: str = "number"
4445
Port: str = "port"
4546
PortsScan: str = "portscan"

test/contracts/test_contract_output_types.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,13 @@ def test_file_wire_label(self):
1010
self.assertEqual(ContractOutputType.File.value, "file")
1111
self.assertEqual(ContractOutputType.File, "file")
1212

13+
def test_action_output_wire_label(self):
14+
# The wire label is a public contract shared with the platform enum
15+
# (io.openaev.database.model.ContractOutputType.ActionOutput); it must stay
16+
# exactly "action_output".
17+
self.assertEqual(ContractOutputType.ActionOutput.value, "action_output")
18+
self.assertEqual(ContractOutputType.ActionOutput, "action_output")
19+
1320

1421
if __name__ == "__main__":
1522
unittest.main()

0 commit comments

Comments
 (0)