Пример #1
0
 def test_get_url_default_domain(self):
     self.assertEqual(
         _get_url("*****@*****.**", "<message-id>"),
         "https://example.com" + reverse('hk_message_index', kwargs={
             "mlist_fqdn": "*****@*****.**",
             "message_id_hash": "3F32NJAOW2XVHJWKZ73T2EPICEIAB3LI"
         }))
Пример #2
0
 def test_get_url_with_domain(self):
     site = Site.objects.create(name="Example", domain="lists.example.org")
     MailDomain.objects.create(site=site, mail_domain="example.com")
     self.assertEqual(
         _get_url("*****@*****.**", "<message-id>"),
         "https://lists.example.org" + reverse('hk_message_index', kwargs={
             "mlist_fqdn": "*****@*****.**",
             "message_id_hash": "3F32NJAOW2XVHJWKZ73T2EPICEIAB3LI"
         }))
Пример #3
0
 def test_get_url_no_msgid(self):
     self.assertEqual(
         _get_url("*****@*****.**"),
         "https://example.com" +
         reverse('hk_list_overview', args=["*****@*****.**"]))