Esempio n. 1
0
    def test_tasteometer(self):
        def mock_group(x):
            if x == 2:
                return self.user1
            else:
                return self.user2

        input = Mock(group=mock_group)
        tasteometer(self.phenny, input)

        out = self.phenny.say.call_args[0][0]
        m = re.match("^{0}'s and {1}'s musical compatibility rating is .*"\
                " and music they have in common includes: .*$".
                format(self.user1, self.user2), out, flags=re.UNICODE)
        self.assertTrue(m)
Esempio n. 2
0
    def test_tasteometer_sender(self):
        def mock_group(x):
            if x == 2:
                return self.user1
            else:
                return ''

        input = Mock(group=mock_group)
        input.nick = self.user2
        tasteometer(self.phenny, input)

        out = self.phenny.say.call_args[0][0]
        m = re.match("^{0}'s and {1}'s musical compatibility rating is .*"\
                " they don't have any artists in common.$".
                format(self.user1, self.user2), out, flags=re.UNICODE)
        self.assertTrue(m)
Esempio n. 3
0
    def test_tasteometer_sender(self):
        def mock_group(x):
            if x == 2:
                return self.user1
            else:
                return ''

        input = Mock(group=mock_group)
        input.nick = self.user2
        tasteometer(self.phenny, input)

        out = self.phenny.say.call_args[0][0]
        m = re.match("^{0}'s and {1}'s musical compatibility rating is .*"\
                " they don't have any artists in common.$".
                format(self.user1, self.user2), out, flags=re.UNICODE)
        self.assertTrue(m)