Esempio n. 1
0
    def test_missing_variable(self):
        """ Prove branding will fail if branding variable is undefined """

        try:
            output = branding.apply_template('My @@UNDEFINED_VALUE@@ is going to fail', {'going': 'to fail'})
            self.fail("Should throw KeyError")
        except KeyError:
            pass
Esempio n. 2
0
    def test_missing_variable(self):
        """ Prove branding will fail if branding variable is undefined """

        try:
            output = branding.apply_template(
                'My @@UNDEFINED_VALUE@@ is going to fail',
                {'going': 'to fail'})
            self.fail("Should throw KeyError")
        except KeyError:
            pass
Esempio n. 3
0
 def test_templating(self):
     output = branding.apply_template(TEMPLATED_CONTENT, TEMPLATE_VARS)
     self.assertEqual(TEMPLATE_EXPECTED, output)
Esempio n. 4
0
 def test_templating(self):
     output = branding.apply_template(TEMPLATED_CONTENT, TEMPLATE_VARS)
     self.assertEqual(TEMPLATE_EXPECTED, output)