示例#1
0
 def test_context_data(self):
     actual = get_test_email_context()
     expected = {
         'sub': '#',
         'unsub': '#',
         'name': '<< Test Name >>',
         'uuid': '[SUBSCRIBER_UUID]'
     }
     self.assertDictEqual(actual, expected)
示例#2
0
 def test_context_data_override(self):
     expected = {
         'sub': '1',
         'unsub': '2',
         'name': '3',
         'uuid': '4'
     }
     actual = get_test_email_context(**expected)
     self.assertDictEqual(actual, expected)
示例#3
0
 def test_context_data(self):
     actual = get_test_email_context()
     expected = {
         'sub': '#',
         'unsub': '#',
         'name': '<< Test Name >>',
         'uuid': '[SUBSCRIBER_UUID]'
     }
     self.assertDictEqual(actual, expected)
示例#4
0
 def test_context_data_inclusion(self):
     actual = get_test_email_context(TEST_INCLUSION_KEY='**TEST**')
     expected = {
         'sub': '#',
         'unsub': '#',
         'name': '<< Test Name >>',
         'uuid': '[SUBSCRIBER_UUID]',
         'TEST_INCLUSION_KEY': '**TEST**'
     }
     self.assertDictEqual(actual, expected)
示例#5
0
 def test_context_data_inclusion(self):
     actual = get_test_email_context(TEST_INCLUSION_KEY='**TEST**')
     expected = {
         'sub': '#',
         'unsub': '#',
         'name': '<< Test Name >>',
         'uuid': '[SUBSCRIBER_UUID]',
         'TEST_INCLUSION_KEY': '**TEST**'
     }
     self.assertDictEqual(actual, expected)
示例#6
0
 def test_context_data_partial_override(self):
     data = {
         'sub': '1',
         'unsub': '2',
         'name': '3',
     }
     actual = get_test_email_context(**data)
     expected = {
         'sub': '1',
         'unsub': '2',
         'name': '3',
         'uuid': '[SUBSCRIBER_UUID]'
     }
     self.assertDictEqual(actual, expected)
示例#7
0
 def test_context_data_partial_override(self):
     data = {
         'sub': '1',
         'unsub': '2',
         'name': '3',
     }
     actual = get_test_email_context(**data)
     expected = {
         'sub': '1',
         'unsub': '2',
         'name': '3',
         'uuid': '[SUBSCRIBER_UUID]'
     }
     self.assertDictEqual(actual, expected)
示例#8
0
 def test_context_data_override(self):
     expected = {'sub': '1', 'unsub': '2', 'name': '3', 'uuid': '4'}
     actual = get_test_email_context(**expected)
     self.assertDictEqual(actual, expected)