Example #1
0
 def test_template_variable_extraction_ignores_doubled_percentages(self):
     variables = Template.extract_variables(
         'Hello %%firstname%%. You are %age% years old?')
     self.assertEqual('age' in variables, True)
 def test_template_variable_extraction_ignores_doubled_percentages(self):
     variables = Template.extract_variables('Hello %%firstname%%. You are %age% years old?')
     self.assertEqual('age' in variables, True)
Example #3
0
 def test_template_can_extract_variables_from_text(self):
     variables = Template.extract_variables(
         'Hello %firstname%. You are %age% years old?')
     self.assertEqual('firstname' in variables, True)
     self.assertEqual('age' in variables, True)
 def test_template_can_extract_variables_from_text(self):
     variables = Template.extract_variables('Hello %firstname%. You are %age% years old?')
     self.assertEqual('firstname' in variables, True)
     self.assertEqual('age'       in variables, True)