Exemplo n.º 1
0
    def testT(self, taskqueue, fastndb):
        task(T, 'T').enqueue()
        consume(taskqueue)

        assert [['T1', 'T2']] == messages
        assert _Result.query().fetch() == []
        assert queue.Lock.model.query().fetch() == []
Exemplo n.º 2
0
    def testYieldPlainValue(self, taskqueue, ndb):
        task(Y, task(YieldPlainValue)).run()
        consume(taskqueue)

        assert ['VALUE'] == messages
        assert _Result.query().fetch() == []
Exemplo n.º 3
0
    def testCallAbort(self, taskqueue, ndb):
        task(Y, task(CallAbort)).run()
        consume(taskqueue)

        assert [] == messages
        assert _Result.query().fetch() == []
Exemplo n.º 4
0
    def testRaisePermanentFailure(self, taskqueue, fastndb):
        task(Y, task(RaisePermanentFailure)).run()
        consume(taskqueue)

        assert [] == messages
        assert _Result.query().fetch() == []
Exemplo n.º 5
0
    def testB(self, taskqueue, ndb):
        task(Y, task(B)).run()
        consume(taskqueue)

        assert ['B'] == messages
        assert _Result.query().fetch() == []
Exemplo n.º 6
0
def _clean():
    assert _Result.query().fetch() == []
Exemplo n.º 7
0
    def testNested(self, taskqueue, fastndb):
        task(Nested).enqueue()
        consume(taskqueue)

        assert "Nested Level1 Level2 Level1 Nested Done".split() == messages
        assert _Result.query().fetch() == []