File tree 1 file changed +27
-0
lines changed
1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -860,3 +860,30 @@ def test_groupresult_save_restore_nested(self):
860
860
restored_group = self .b .restore_group (group_id = group_id )
861
861
862
862
assert restored_group == group
863
+
864
+ def test_backend_result_extended_is_false (self ):
865
+ self .app .conf .result_extended = False
866
+ self .b = DatabaseBackend (app = self .app )
867
+ tid2 = uuid ()
868
+ request = self ._create_request (
869
+ task_id = tid2 ,
870
+ name = 'my_task' ,
871
+ args = ['a' , 1 , True ],
872
+ kwargs = {'c' : 6 , 'd' : 'e' , 'f' : False },
873
+ )
874
+ result = 'foo'
875
+
876
+ self .b .mark_as_done (tid2 , result , request = request )
877
+
878
+ mindb = self .b .get_task_meta (tid2 )
879
+
880
+ # check meta data
881
+ assert mindb .get ('result' ) == 'foo'
882
+ assert mindb .get ('task_name' ) is None
883
+ assert mindb .get ('task_args' ) is None
884
+ assert mindb .get ('task_kwargs' ) is None
885
+
886
+ # check task_result object
887
+ tr = TaskResult .objects .get (task_id = tid2 )
888
+ assert tr .task_args is None
889
+ assert tr .task_kwargs is None
You can’t perform that action at this time.
0 commit comments