def test_update_invalid_url(self):
        self.reader.new_messages.return_value = [1237]
        self.reader.get.return_value = self.msg
        self.msg.replace_header('Subject', u'GET')
        self.assertTrue(self.distributor.update())

        check_start_stop(self)
        self.assertEqual(self.sender.send.call_count, 0)
        self.assertEqual(self.reader.delete.call_count, 1)
Beispiel #2
0
    def test_update_invalid_url(self):
        self.reader.new_messages.return_value = [1237]
        self.reader.get.return_value = self.msg
        self.msg.replace_header('Subject', u'GET')
        self.assertTrue(self.distributor.update())

        check_start_stop(self)
        self.assertEqual(self.sender.send.call_count, 0)
        self.assertEqual(self.reader.delete.call_count, 1)
    def test_update(self, urlopen):
        urlopen.return_value = open_data('google.html')
        self.reader.new_messages.return_value = [1237]
        self.reader.get.return_value = self.msg
        self.assertTrue(self.distributor.update())

        check_start_stop(self)
        check_interactions(self, 1237)
        check_archived(self, self.msg)
Beispiel #4
0
    def test_update(self, urlopen):
        urlopen.return_value = open_data('google.html')
        self.reader.new_messages.return_value = [1237]
        self.reader.get.return_value = self.msg
        self.assertTrue(self.distributor.update())

        check_start_stop(self)
        check_interactions(self, 1237)
        check_archived(self, self.msg)