Beispiel #1
0
def getMessageModel(author, message):
    if spam.isSpam(message):
        greeting = SpamGreeting()
    else:
        greeting = Greeting()

    greeting.author = author
    greeting.message = message
    return greeting
Beispiel #2
0
 def testMessagesNotMarkedAsSpam(self):
     for msg in self.msgList:
         self.assertFalse(spam.isSpam(msg))
Beispiel #3
0
 def testSpamFromSiteIsSpam(self):
     for msg in self.spamList:
         self.assertTrue(spam.isSpam(msg))