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