Esempio n. 1
0
 def test_after_return(self):
     task = self.createTask('c.unittest.t.after_return')
     task.push_request()
     try:
         task.request.chord = return_True_task.s()
         task.after_return('SUCCESS', 1.0, 'foobar', (), {}, None)
         task.request.clear()
     finally:
         task.pop_request()
Esempio n. 2
0
 def test_after_return(self):
     task = self.createTask('c.unittest.t.after_return')
     task.push_request()
     try:
         task.request.chord = return_True_task.s()
         task.after_return('SUCCESS', 1.0, 'foobar', (), {}, None)
         task.request.clear()
     finally:
         task.pop_request()
Esempio n. 3
0
 def test_after_return(self):
     task = self.createTask("c.unittest.t.after_return")
     task.push_request()
     try:
         task.request.chord = return_True_task.s()
         task.after_return("SUCCESS", 1.0, "foobar", (), {}, None)
         task.request.clear()
     finally:
         task.pop_request()
Esempio n. 4
0
 def test_context_get(self):
     task = self.createTask('c.unittest.t.c.g')
     task.push_request()
     try:
         request = task.request
         request.foo = 32
         self.assertEqual(request.get('foo'), 32)
         self.assertEqual(request.get('bar', 36), 36)
         request.clear()
     finally:
         task.pop_request()
Esempio n. 5
0
 def test_context_get(self):
     task = self.createTask('c.unittest.t.c.g')
     task.push_request()
     try:
         request = task.request
         request.foo = 32
         self.assertEqual(request.get('foo'), 32)
         self.assertEqual(request.get('bar', 36), 36)
         request.clear()
     finally:
         task.pop_request()