From a9a9fd2c778aa8cfde5f244420602a70dab44cfa Mon Sep 17 00:00:00 2001 From: Barry Warsaw Date: Tue, 14 Apr 2015 18:54:05 -0400 Subject: Full test suite passes. * Make sure Registrar.discard() removces any workflow state manager state associated with the token, and that this is flushed to SA. * Adjust the email commands to the new IRegistrar API. * Update the IRegistrar interface. * Add IWorkflowStateManager.discard() and make `count` an attribute/property. * Mark two tests as expected failures due to LP: #1444184. --- src/mailman/interfaces/workflow.py | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) (limited to 'src/mailman/interfaces/workflow.py') diff --git a/src/mailman/interfaces/workflow.py b/src/mailman/interfaces/workflow.py index b60537652..f80e38547 100644 --- a/src/mailman/interfaces/workflow.py +++ b/src/mailman/interfaces/workflow.py @@ -63,9 +63,18 @@ class IWorkflowStateManager(Interface): :type name: str :param token: A unique token identifying this workflow instance. :type token: str - :raises LookupError: when there's no token associated with the given - name in the workflow table. + :return: The saved state associated with this name/token pair, or None + if the pair isn't in the database. + :rtype: ``IWorkflowState`` """ - def count(): - """The number of saved workflows in the database.""" + def discard(name, token): + """Throw away the saved state for a workflow. + + :param name: The name of the workflow. + :type name: str + :param token: A unique token identifying this workflow instance. + :type token: str + """ + + count = Attribute('The number of saved workflows in the database.') -- cgit v1.2.3-70-g09d2