Skip to content

Commit e9e3b90

Browse files
committed
[ci] Remove outdated redundant tests
1 parent 31f4a0b commit e9e3b90

File tree

1 file changed

+3
-21
lines changed

1 file changed

+3
-21
lines changed

Diff for: backend/globaleaks/tests/jobs/test_cleaning.py

+3-21
Original file line numberDiff line numberDiff line change
@@ -38,17 +38,6 @@ def check1(self, session):
3838
def check2(self, session):
3939
self.assertEqual(len(os.listdir(Settings.attachments_path)), self.population_of_submissions * self.population_of_attachments)
4040

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-
5241
self.db_test_model_count(session, models.InternalTip, self.population_of_submissions)
5342
self.db_test_model_count(session, models.ReceiverTip, self.population_of_recipients * self.population_of_submissions)
5443
self.db_test_model_count(session, models.InternalFile, self.population_of_submissions * self.population_of_attachments)
@@ -57,7 +46,7 @@ def check3(self, session):
5746
self.db_test_model_count(session, models.Mail, self.population_of_recipients)
5847

5948
@transact
60-
def check4(self, session):
49+
def check3(self, session):
6150
self.assertEqual(len(os.listdir(Settings.attachments_path)), 0)
6251

6352
self.db_test_model_count(session, models.InternalTip, 0)
@@ -91,23 +80,16 @@ def test_job(self):
9180
# verify tips survive the scheduler if they are not expired
9281
yield self.check1()
9382

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-
10183
yield self.set_itips_near_to_expire()
10284

10385
yield cleaning.Cleaning().run()
10486

10587
# verify mail creation and that rtips survive the scheduler
106-
yield self.check3()
88+
yield self.check2()
10789

10890
yield self.set_itip_expiration(now)
10991

11092
yield cleaning.Cleaning().run()
11193

11294
# verify cascade deletion when tips expire
113-
yield self.check4()
95+
yield self.check3()

0 commit comments

Comments
 (0)