Changeset - 20d588f15b3d
[Not reviewed]
0 1 0
Lance Edgar (lance) - 4 months ago 2024-07-04 22:10:23
lance@edbob.org
test: fix broken test

now that we are providing a default value for mail template paths. i
could not think of any reason we were *not* doing that before...?
1 file changed with 7 insertions and 4 deletions:
0 comments (0 inline, 0 general)
tests/test_mail.py
Show inline comments
 
# -*- coding: utf-8; -*-
 

	
 
import unittest
 
import os
 
from unittest import TestCase
 

	
 
from rattail import mail
 
from rattail.config import RattailConfig
 

	
 

	
 
class TestEmail(unittest.TestCase):
 
class TestEmail(TestCase):
 

	
 
    def test_template_lookup_paths(self):
 

	
 
        # empty (no paths) by default
 
        # default paths
 
        config = RattailConfig()
 
        email = mail.Email(config, 'testing')
 
        self.assertEqual(email.html_templates.directories, [])
 
        self.assertEqual(len(email.html_templates.directories), 1)
 
        path = email.html_templates.directories[0]
 
        self.assertTrue(path.endswith(os.path.join('rattail', 'templates', 'mail')))
 
        
 
        # config may specify paths
 
        config = RattailConfig()
0 comments (0 inline, 0 general)