示例#1
0
 def setUp(self):
     self.q = Queue()
     # pre-call this so we don't need to use multi-process
     # otherwise this is called within the classmethod
     PQ.listen('default', ['default'])
     # Fire off a notification of a fake job enqueued
     self.q.notify(1)
示例#2
0
    def test_listen(self):
        """Postgresql LISTEN on channel with default connection"""

        conn = PQ.listen('default', ['default'])
        self.assertIsNotNone(conn)