Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(5)  |  Call(3)  |  Derive(0)  |  Import(2)

src/d/j/django-oscar-HEAD/tests/unit/customer/customer_tests.py   django-oscar(Download)
from oscar.apps.customer.utils import Dispatcher
from oscar.test.factories import create_order
from oscar.apps.customer.models import CommunicationEventType
 
 
    def test_no_templates_returns_empty_string(self):
        et = CommunicationEventType()
        messages = et.get_messages()
        for key in self.keys:
            self.assertEqual('', messages[key])
 
    def test_field_template_render(self):
        et = CommunicationEventType(email_subject_template='Hello {{ name }}')
 
        for original, modified in subjects:
            et = CommunicationEventType(email_subject_template=original)
            messages = et.get_messages()
            self.assertEqual(modified, messages['subject'])

src/d/j/django-oscar-HEAD/tests/functional/dashboard/communication_tests.py   django-oscar(Download)
from oscar.test.testcases import WebTestCase
from oscar.core.compat import get_user_model
from oscar.apps.customer.models import CommunicationEventType
 
User = get_user_model()