diff options
Diffstat (limited to 'src/mailman/app/tests/test_subscriptions.py')
| -rw-r--r-- | src/mailman/app/tests/test_subscriptions.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/mailman/app/tests/test_subscriptions.py b/src/mailman/app/tests/test_subscriptions.py index fde33b91e..05646c929 100644 --- a/src/mailman/app/tests/test_subscriptions.py +++ b/src/mailman/app/tests/test_subscriptions.py @@ -100,6 +100,21 @@ class TestSubscriptionWorkflow(unittest.TestCase): self.assertEqual(workflow.pre_confirmed, False) self.assertEqual(workflow.pre_approved, False) + def test_save_restore_no_next_step(self): + anne = self._user_manager.create_address(self._anne, 'Anne Person') + workflow = SubscriptionWorkflow( + self._mlist, anne, + pre_verified=True, pre_confirmed=False, pre_approved=False) + workflow._next.pop() + self.assertEqual(len(workflow._next), 0) + workflow.save_state() + # Now create a new instance and restore + workflow = SubscriptionWorkflow( + self._mlist, anne, + pre_verified=None, pre_confirmed=None, pre_approved=None) + workflow.restore_state() + self.assertEqual(len(workflow._next), 0) + def test_preverified_address_joins_open_list(self): # The mailing list has an open subscription policy, so the subscriber # becomes a member with no human intervention. |
