Example #1
0
    def test_match(self):
        Education.objects.create(
            trigger="hello",
            regex=False,
            probability=1.0,
            response="sup?",
        )

        r = receivers.lookup_education_response(
            None,
            content='Hello!',
            user='******',
        )

        self.assertEqual(r['content'], 'sup?')
Example #2
0
 def test_no_match(self):
     r = receivers.lookup_education_response(None, content='Hello!', user='******')
     self.assertEqual(r, None)