def test_from_lxml_full(self):
        text = '''<STREAM location="path" cycle="123" cycle_gzip="NO">
  <FILTER>gzip</FILTER>
  <FILTER>bzip2</FILTER>
</STREAM>'''
        log = Stream.from_lxml_element(etree.XML(text))
        right = Stream('path', 123, False, ['gzip', 'bzip2'])
        self.assertEqual(log, right)
Exemple #2
0
    def test_from_lxml_full(self):
        text = '''<STREAM location="path" cycle="123" cycle_gzip="NO">
  <FILTER>gzip</FILTER>
  <FILTER>bzip2</FILTER>
</STREAM>'''
        log = Stream.from_lxml_element(etree.XML(text))
        right = Stream('path', 123, False, ['gzip', 'bzip2'])
        self.assertEqual(log, right)
Exemple #3
0
 def test_from_lxml_filters(self):
     text = '<STREAM><FILTER>gzip</FILTER><FILTER>bzip2</FILTER></STREAM>'
     log = Stream.from_lxml_element(etree.XML(text))
     right = Stream(filters=['gzip', 'bzip2'])
     self.assertEqual(log, right)
Exemple #4
0
 def test_from_lxml_cycle_gzip(self):
     text = '<STREAM cycle_gzip="NO" />'
     log = Stream.from_lxml_element(etree.XML(text))
     right = Stream(cycle_gzip=False)
     self.assertEqual(log, right)
Exemple #5
0
 def test_from_lxml_cycle(self):
     text = '<STREAM cycle="123" />'
     log = Stream.from_lxml_element(etree.XML(text))
     right = Stream(cycle=123)
     self.assertEqual(log, right)
Exemple #6
0
 def test_from_lxml_location(self):
     text = '<STREAM location="path" />'
     log = Stream.from_lxml_element(etree.XML(text))
     right = Stream(location='path')
     self.assertEqual(log, right)
 def test_from_lxml_location(self):
     text = '<STREAM location="path" />'
     log = Stream.from_lxml_element(etree.XML(text))
     right = Stream(location = 'path')
     self.assertEqual(log, right)
Exemple #8
0
 def test_to_lxml_filters(self):
     log = Stream(filters=['gzip', 'bzip2'])
     copy = Stream.from_lxml_element(log.to_lxml_element())
     self.assertEqual(log, copy)
Exemple #9
0
 def test_to_lxml_cycle(self):
     log = Stream(cycle=123)
     copy = Stream.from_lxml_element(log.to_lxml_element())
     self.assertEqual(log, copy)
 def test_to_lxml_cycle_gzip(self):
     log = Stream(cycle_gzip = False)
     copy = Stream.from_lxml_element(log.to_lxml_element())
     self.assertEqual(log, copy)
 def test_to_lxml_cycle(self):
     log = Stream(cycle = 123)
     copy = Stream.from_lxml_element(log.to_lxml_element())
     self.assertEqual(log, copy)
 def test_to_lxml_location(self):
     log = Stream(location = 'path')
     copy = Stream.from_lxml_element(log.to_lxml_element())
     self.assertEqual(log, copy)
 def test_from_lxml_filters(self):
     text = '<STREAM><FILTER>gzip</FILTER><FILTER>bzip2</FILTER></STREAM>'
     log = Stream.from_lxml_element(etree.XML(text))
     right = Stream(filters = ['gzip', 'bzip2'])
     self.assertEqual(log, right)
 def test_from_lxml_cycle_gzip(self):
     text = '<STREAM cycle_gzip="NO" />'
     log = Stream.from_lxml_element(etree.XML(text))
     right = Stream(cycle_gzip = False)
     self.assertEqual(log, right)
 def test_from_lxml_cycle(self):
     text = '<STREAM cycle="123" />'
     log = Stream.from_lxml_element(etree.XML(text))
     right = Stream(cycle = 123)
     self.assertEqual(log, right)
 def test_to_lxml_filters(self):
     log = Stream(filters = ['gzip', 'bzip2'])
     copy = Stream.from_lxml_element(log.to_lxml_element())
     self.assertEqual(log, copy)
Exemple #17
0
 def test_to_lxml_location(self):
     log = Stream(location='path')
     copy = Stream.from_lxml_element(log.to_lxml_element())
     self.assertEqual(log, copy)
 def test_to_lxml_full(self):
     log = Stream('path', 123, False, ['gzip', 'bzip2'])
     copy = Stream.from_lxml_element(log.to_lxml_element())
     self.assertEqual(log, copy)
Exemple #19
0
 def test_to_lxml_cycle_gzip(self):
     log = Stream(cycle_gzip=False)
     copy = Stream.from_lxml_element(log.to_lxml_element())
     self.assertEqual(log, copy)
Exemple #20
0
 def test_from_lxml(self):
     text = '<STREAM />'
     log = Stream.from_lxml_element(etree.XML(text))
     right = Stream()
     self.assertEqual(log, right)
Exemple #21
0
 def test_to_lxml_full(self):
     log = Stream('path', 123, False, ['gzip', 'bzip2'])
     copy = Stream.from_lxml_element(log.to_lxml_element())
     self.assertEqual(log, copy)
 def test_from_lxml(self):
     text = '<STREAM />'
     log = Stream.from_lxml_element(etree.XML(text))
     right = Stream()
     self.assertEqual(log, right)