示例#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
示例#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
示例#3
0
 def test_templating(self):
     output = branding.apply_template(TEMPLATED_CONTENT, TEMPLATE_VARS)
     self.assertEqual(TEMPLATE_EXPECTED, output)
示例#4
0
 def test_templating(self):
     output = branding.apply_template(TEMPLATED_CONTENT, TEMPLATE_VARS)
     self.assertEqual(TEMPLATE_EXPECTED, output)