Exemple #1
0
    def test_list_reponds_via_privmsg_for_specific_chan(self, list_reminders):
        client = Mock()

        assert reminders.reminders(client, '#all', 'sduncan', 'reminders list #bots',
                                   'reminders', ['list', '#bots']) is None
        client.me.assert_called_with('#all', 'whispers to sduncan')
        list_reminders.assert_called_with(client, 'sduncan', '#bots')
Exemple #2
0
    def test_list_reponds_via_privmsg(self, list_reminders):
        client = Mock()

        assert reminders.reminders(client, '#all', 'sduncan', 'reminders list',
                                   'reminders', ['list']) is None
        client.me.assert_called_with('#all', 'whispers to sduncan')
        list_reminders.assert_called_with(client, 'sduncan', '#all')
Exemple #3
0
 def test_delete_reminder(self, delete_reminder):
     client = Mock()
     reminders.reminders(client, '#bots', 'me', 'message', 'reminders', ['delete', '1'])
     delete_reminder.assert_called_with('#bots', '1')
Exemple #4
0
 def test_list_reminders_with_channel(self, list_reminder):
     client = Mock()
     reminders.reminders(client, '#bots', 'me', 'message', 'reminders', ['list', '#blah'])
     list_reminder.assert_called_with(client, 'me', '#blah')
     client.me.assert_called_with('#bots', 'whispers to me')
Exemple #5
0
 def test_at_reminder(self, at_reminder):
     client = Mock()
     reminders.reminders(client, '#bots', 'me', 'message', 'at', ['args'])
     at_reminder.assert_called_with(client, '#bots', 'me', ['args'])
Exemple #6
0
 def test_in_reminder(self, in_reminder):
     client = Mock()
     reminders.reminders(client, '#bots', 'me', 'message', 'in', ['args'])
     in_reminder.assert_called_with(client, '#bots', 'me', ['args'])
Exemple #7
0
 def test_delete_reminder(self, delete_reminder):
     client = Mock()
     reminders.reminders(client, '#bots', 'me', 'message', 'reminders',
                         ['delete', '1'])
     delete_reminder.assert_called_with('#bots', '1')
Exemple #8
0
 def test_list_reminders_with_channel(self, list_reminder):
     client = Mock()
     reminders.reminders(client, '#bots', 'me', 'message', 'reminders',
                         ['list', '#blah'])
     list_reminder.assert_called_with(client, 'me', '#blah')
     client.me.assert_called_with('#bots', 'whispers to me')
Exemple #9
0
 def test_at_reminder(self, at_reminder):
     client = Mock()
     reminders.reminders(client, '#bots', 'me', 'message', 'at', ['args'])
     at_reminder.assert_called_with(client, '#bots', 'me', ['args'])
Exemple #10
0
 def test_in_reminder(self, in_reminder):
     client = Mock()
     reminders.reminders(client, '#bots', 'me', 'message', 'in', ['args'])
     in_reminder.assert_called_with(client, '#bots', 'me', ['args'])