@@ -38,17 +38,6 @@ def check1(self, session):
38
38
def check2 (self , session ):
39
39
self .assertEqual (len (os .listdir (Settings .attachments_path )), self .population_of_submissions * self .population_of_attachments )
40
40
41
- self .db_test_model_count (session , models .InternalTip , self .population_of_submissions )
42
- self .db_test_model_count (session , models .ReceiverTip , self .population_of_recipients * self .population_of_submissions )
43
- self .db_test_model_count (session , models .InternalFile , self .population_of_submissions * self .population_of_attachments )
44
- self .db_test_model_count (session , models .WhistleblowerFile , self .population_of_submissions * self .population_of_attachments * self .population_of_recipients )
45
- self .db_test_model_count (session , models .Comment , 4 )
46
- self .db_test_model_count (session , models .Mail , 0 )
47
-
48
- @transact
49
- def check3 (self , session ):
50
- self .assertEqual (len (os .listdir (Settings .attachments_path )), self .population_of_submissions * self .population_of_attachments )
51
-
52
41
self .db_test_model_count (session , models .InternalTip , self .population_of_submissions )
53
42
self .db_test_model_count (session , models .ReceiverTip , self .population_of_recipients * self .population_of_submissions )
54
43
self .db_test_model_count (session , models .InternalFile , self .population_of_submissions * self .population_of_attachments )
@@ -57,7 +46,7 @@ def check3(self, session):
57
46
self .db_test_model_count (session , models .Mail , self .population_of_recipients )
58
47
59
48
@transact
60
- def check4 (self , session ):
49
+ def check3 (self , session ):
61
50
self .assertEqual (len (os .listdir (Settings .attachments_path )), 0 )
62
51
63
52
self .db_test_model_count (session , models .InternalTip , 0 )
@@ -91,23 +80,16 @@ def test_job(self):
91
80
# verify tips survive the scheduler if they are not expired
92
81
yield self .check1 ()
93
82
94
- yield self .set_itip_expiration (now )
95
-
96
- yield cleaning .Cleaning ().run ()
97
-
98
- # verify rtips survive the scheduler if the wbtip expires
99
- yield self .check2 ()
100
-
101
83
yield self .set_itips_near_to_expire ()
102
84
103
85
yield cleaning .Cleaning ().run ()
104
86
105
87
# verify mail creation and that rtips survive the scheduler
106
- yield self .check3 ()
88
+ yield self .check2 ()
107
89
108
90
yield self .set_itip_expiration (now )
109
91
110
92
yield cleaning .Cleaning ().run ()
111
93
112
94
# verify cascade deletion when tips expire
113
- yield self .check4 ()
95
+ yield self .check3 ()
0 commit comments