Clean up at the end of every selftest run
[mudpy.git] / mudpy / tests / selftest.py
index f262063..fa96ad0 100644 (file)
@@ -261,6 +261,21 @@ test_log_no_errors = (
     (2, r"None of the [0-9]+ lines in memory matches your request\.", ""),
 )
 
+final_cleanup = (
+    (0, "> ", "quit"),
+    (0, "What would you like to do?", "d"),
+    (0, "Whom would you like to delete?", ""),
+    (0, "What would you like to do?", "p"),
+    (0, "permanently delete your account?", "y"),
+    (0, "Disconnecting...", ""),
+    (2, "> ", "quit"),
+    (2, "What would you like to do?", "d"),
+    (2, "Whom would you like to delete?", ""),
+    (2, "What would you like to do?", "p"),
+    (2, "permanently delete your account?", "y"),
+    (2, "Disconnecting...", ""),
+)
+
 dialogue = (
     (test_account0_setup, "first account setup"),
     (test_account1_setup, "second account setup"),
@@ -293,6 +308,7 @@ dialogue = (
     (test_custom_loglevel, "custom loglevel"),
     (test_invalid_loglevel, "invalid loglevel"),
     (test_log_no_errors, "no errors logged"),
+    (final_cleanup, "delete remaining accounts"),
 )