def test_creating_template_names_with_processor(): filename = 'special_file.html' processor = mock.Mock() processor.name = 'messaging' template_names = views._get_template_names(filename, processor) expected_template_names = [ os.path.join(views.BASE_TEMPLATE_DIR, processor.name, filename), os.path.join(views.BASE_TEMPLATE_DIR, filename)] assert template_names == expected_template_names
def test_creating_template_names_without_processor(): filename = 'special_file.html' template_names = views._get_template_names(filename) assert template_names == [os.path.join(views.BASE_TEMPLATE_DIR, filename)]