Add a processed() call for subthread testing
authorJack Miller <jack@codezen.org>
Sat, 22 Nov 2014 21:23:00 +0000 (15:23 -0600)
committerJack Miller <jack@codezen.org>
Sun, 23 Nov 2014 07:35:40 +0000 (01:35 -0600)
This allows us to know when the protocol function has returned.

canto_curses/subthread.py

index bd4de87..592e6e3 100644 (file)
@@ -68,6 +68,11 @@ class SubThread(object):
                 protfunc = "prot_" + cmd.lower()
                 if hasattr(self, protfunc):
                     getattr(self, protfunc)(args)
+
+                    # For test-suite
+                    if hasattr(self.backend, "processed"):
+                        self.backend.processed(cmd, args)
+
                 else:
                     log.error("Unknown response?")
                     log.error("%s - %s" % (cmd, args))