Пример #1
0
 def test(self):
     email = '*****@*****.**'
     rule = EmailRule( rule=EmailRule.NOT_MATCHING_CATEGORY_CLASS, city = self.test_city, category_class = self.test_categoryclass, email=email )
     rule.save()
     self.failUnlessEqual( self.test_ward.get_emails(self.test_report), ([],[]) )
     report2 = Report(ward=self.test_ward,category=self.not_test_category)
     self.failUnlessEqual( self.test_ward.get_emails(report2), ([email],[]) )
Пример #2
0
 def test(self):
     email = '*****@*****.**'
     rule = EmailRule( rule=EmailRule.NOT_MATCHING_CATEGORY_CLASS, city = self.test_city, category_class = self.test_categoryclass, email=email )
     rule.save()
     self.failUnlessEqual( self.test_ward.get_emails(self.test_report), ([],[]) )
     report2 = Report(ward=self.test_ward,category=self.not_test_category)
     self.failUnlessEqual( self.test_ward.get_emails(report2), ([email],[]) )
Пример #3
0
 def test(self):
     email = '*****@*****.**'
     rule = EmailRule( rule=EmailRule.TO_WARD, city = self.test_city )
     rule.save()
     self.test_ward.councillor = None
     self.test_ward.email = email
     self.test_ward.save()
     self.failUnlessEqual( self.test_ward.get_emails(self.test_report), ([email],[]) )
Пример #4
0
 def test(self):
     rule = EmailRule( rule=EmailRule.TO_COUNCILLOR, city = self.test_city )
     rule.save()
     self.failUnlessEqual( self.test_ward.get_emails(self.test_report), ([self.test_report.ward.councillor.email],[]) )
Пример #5
0
 def test(self):
     rule = EmailRule( rule=EmailRule.TO_COUNCILLOR, city = self.test_city )
     rule.save()
     self.failUnlessEqual( self.test_ward.get_emails(self.test_report), ([self.test_report.ward.councillor.email],[]) )