Beispiel #1
0
 def test_init_global_value_only(self):
     var = TemplateConditionVariable(value=TemplateWordNode("value1"))
     self.assertIsNotNone(var)
     self.assertIsNone(var.name)
     self.assertEqual(var.value.word, "value1")
     self.assertEqual(var.var_type, TemplateConditionVariable.GLOBAL)
     self.assertFalse(var.loop)
     self.assertEquals("[NODE]", var.to_string())
Beispiel #2
0
 def test_init_defaults(self):
     var = TemplateConditionVariable()
     self.assertIsNotNone(var)
     self.assertIsNone(var.name)
     self.assertIsNone(var.value)
     self.assertEqual(var.var_type, TemplateConditionVariable.GLOBAL)
     self.assertFalse(var.loop)
     self.assertEquals("[NODE]", var.to_string())
Beispiel #3
0
 def test_init_global_name_only(self):
     var = TemplateConditionVariable(name="var1")
     self.assertIsNotNone(var)
     self.assertEqual(var.name, "var1")
     self.assertIsNone(var.value)
     self.assertEqual(var.var_type, TemplateConditionVariable.GLOBAL)
     self.assertFalse(var.loop)
     self.assertEquals("[NODE]", var.to_string())