コード例 #1
0
 def test_update_list(self):
     """List records must be updated when changed in Mailman"""
     msg = Message()
     msg["From"] = "*****@*****.**"
     msg["Message-ID"] = "<dummy>"
     msg.set_payload("Dummy message")
     ml = FakeList("example-list")
     ml.display_name = u"name 1"
     self.store.add_to_list(ml, msg)
     ml_db = self.store.db.find(List).one()
     self.assertEqual(ml_db.display_name, "name 1")
     ml.display_name = u"name 2"
     self.store.add_to_list(ml, msg)
     ml_db = self.store.db.find(List).one()
     self.assertEqual(ml_db.display_name, "name 2")
コード例 #2
0
ファイル: test_storm_store.py プロジェクト: olasd/kittystore
 def test_update_list(self):
     """List records must be updated when changed in Mailman"""
     msg = Message()
     msg["From"] = "*****@*****.**"
     msg["Message-ID"] = "<dummy>"
     msg.set_payload("Dummy message")
     ml = FakeList("example-list")
     ml.display_name = u"name 1"
     ml.subject_prefix = u"[prefix 1]"
     self.store.add_to_list(ml, msg)
     ml_db = self.store.db.find(List).one()
     self.assertEqual(ml_db.display_name, "name 1")
     self.assertEqual(ml_db.subject_prefix, "[prefix 1]")
     ml.display_name = u"name 2"
     ml.subject_prefix = u"[prefix 2]"
     self.store.add_to_list(ml, msg)
     ml_db = self.store.db.find(List).one()
     self.assertEqual(ml_db.display_name, "name 2")
     self.assertEqual(ml_db.subject_prefix, "[prefix 2]")
コード例 #3
0
ファイル: test_store.py プロジェクト: adam-iris/kittystore
    def add_fetch_data(self):
        msg = Message()
        msg["From"] = "*****@*****.**"
        msg["Subject"] = "Fake Subject"
        msg["Message-ID"] = "<dummy>"
        msg["Date"] = "Fri, 02 Nov 2012 16:07:54"
        msg.set_payload("Fake Message")

        ml = FakeList("example-list")
        ml.display_name = u"name 1"
        ml.subject_prefix = u"[prefix 1]"

        return ml.fqdn_listname, self.store.add_to_list(ml, msg)
コード例 #4
0
    def add_fetch_data(self):
        msg = Message()
        msg["From"] = "*****@*****.**"
        msg["Subject"] = "Fake Subject"
        msg["Message-ID"] = "<dummy>"
        msg["Date"] = "Fri, 02 Nov 2012 16:07:54"
        msg.set_payload("Fake Message")

        ml = FakeList("example-list")
        ml.display_name = u"name 1"
        ml.subject_prefix = u"[prefix 1]"

        return ml.fqdn_listname, self.store.add_to_list(ml, msg)