Exemplo n.º 1
0
 def test_to_lxml_full(self):
     condition = Condition('name', 'value', True, True,
                           [Permission(), Return()])
     copy = Condition.from_lxml_element(condition.to_lxml_element())
     self.assertEqual(condition, copy)
Exemplo n.º 2
0
 def test_to_lxml_regex(self):
     condition = Condition(regex = True)
     copy = Condition.from_lxml_element(condition.to_lxml_element())
     self.assertEqual(condition, copy)
Exemplo n.º 3
0
 def test_to_lxml_sub_elements(self):
     condition = Condition(sub_elements = [Permission(), Return()])
     copy = Condition.from_lxml_element(condition.to_lxml_element())
     self.assertEqual(condition, copy)
Exemplo n.º 4
0
 def test_to_lxml_name(self):
     condition = Condition(name = 'name')
     copy = Condition.from_lxml_element(condition.to_lxml_element())
     self.assertEqual(condition, copy)
Exemplo n.º 5
0
 def test_to_lxml_value(self):
     condition = Condition(value = 'value')
     copy = Condition.from_lxml_element(condition.to_lxml_element())
     self.assertEqual(condition, copy)
Exemplo n.º 6
0
 def test_to_lxml_full(self):
     condition = Condition('name', 'value', True, True,
                           [Permission(), Return()])
     copy = Condition.from_lxml_element(condition.to_lxml_element())
     self.assertEqual(condition, copy)
Exemplo n.º 7
0
 def test_to_lxml_sub_elements(self):
     condition = Condition(sub_elements=[Permission(), Return()])
     copy = Condition.from_lxml_element(condition.to_lxml_element())
     self.assertEqual(condition, copy)
Exemplo n.º 8
0
 def test_to_lxml_regex(self):
     condition = Condition(regex=True)
     copy = Condition.from_lxml_element(condition.to_lxml_element())
     self.assertEqual(condition, copy)
Exemplo n.º 9
0
 def test_to_lxml_value(self):
     condition = Condition(value='value')
     copy = Condition.from_lxml_element(condition.to_lxml_element())
     self.assertEqual(condition, copy)
Exemplo n.º 10
0
 def test_to_lxml_name(self):
     condition = Condition(name='name')
     copy = Condition.from_lxml_element(condition.to_lxml_element())
     self.assertEqual(condition, copy)