Skip to main content

PurgeMock

This class provides a mock implementation for purging operations, specifically allowing for the simulation of clearing message queues. It includes a method to handle purge requests by returning a default status code, facilitating testing of queue-related logic without performing actual deletions.

Methods​


queue_purge()​

@classmethod
def queue_purge(
queue: str
) - > int

Removes all messages from the specified queue by resetting its message count to zero.

Parameters​

NameTypeDescription
queuestrThe identifier or name of the message queue to be cleared.

Returns​

TypeDescription
intThe number of messages successfully purged from the queue, which is always 0 in this mock implementation.