def test_get_template(self):
     with mock.patch.object(NotificationTemplate, '_parsed_templates', {}):
         self.assertNotIn(
             'blah blah blah', NotificationTemplate._parsed_templates)
         t = NotificationTemplate._get_template('blah blah blah')
         self.assertIn(
             'blah blah blah', NotificationTemplate._parsed_templates)
         self.assertEqual(
             t, NotificationTemplate._get_template('blah blah blah'))
Esempio n. 2
0
 def test_get_template(self):
     with mock.patch.object(NotificationTemplate, '_parsed_templates', {}):
         self.assertNotIn('blah blah blah',
                          NotificationTemplate._parsed_templates)
         t = NotificationTemplate._get_template('blah blah blah')
         self.assertIn('blah blah blah',
                       NotificationTemplate._parsed_templates)
         self.assertEqual(
             t, NotificationTemplate._get_template('blah blah blah'))