~abompard/mailman/import21

« back to all changes in this revision

Viewing changes to src/mailman/utilities/tests/test_import.py

  • Committer: Aurélien Bompard
  • Date: 2013-10-11 15:40:39 UTC
  • Revision ID: aurelien@bompard.org-20131011154039-i6synu9qb1cjbgo8
Don't change the mail_host when importing

Show diffs side-by-side

added added

removed removed

Lines of Context:
77
77
        self._import()
78
78
        self.assertEqual(self._mlist.display_name, 'Test')
79
79
 
80
 
    def test_mail_host(self):
81
 
        # The mlist.mail_host gets set.
 
80
    def test_mail_host_invariant(self):
 
81
        # The mlist.mail_host must not be updated when importing (it will
 
82
        # change the list_id property, which is supposed to be read-only)
82
83
        self.assertEqual(self._mlist.mail_host, 'example.com')
83
84
        self._import()
84
 
        self.assertEqual(self._mlist.mail_host, 'heresy.example.org')
 
85
        self.assertEqual(self._mlist.mail_host, 'example.com')
85
86
 
86
87
    def test_rfc2369_headers(self):
87
88
        self._mlist.allow_list_posts = False