Testing and Running UDF
Unit Tests
def test_process(self):
# Setup test data
transactions = [
Transaction(hash='0x1', value='0xde0b6b3a7640000', from_address='0xabc'), # 1 Ether
Transaction(hash='0x2', value='0x1bc16d674ec80000', from_address='0xdef'), # 2 Ether
]
job = YourCustomJob()
# Run the process method
result = job.process(transactions)
# Assert the results
self.assertEqual(len(result), 1)
self.assertEqual(result[0].field1, '0x2')
# Add more assertions as necessary
if name == 'main': unittest.main()Integration Tests
Running the hemera indexer with UDFs
Steps to Running
Using Docker
Running from Source
Last updated