def getMessageModel(author, message): if spam.isSpam(message): greeting = SpamGreeting() else: greeting = Greeting() greeting.author = author greeting.message = message return greeting
def testMessagesNotMarkedAsSpam(self): for msg in self.msgList: self.assertFalse(spam.isSpam(msg))
def testSpamFromSiteIsSpam(self): for msg in self.spamList: self.assertTrue(spam.isSpam(msg))