Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
22 lines (13 sloc) 447 Bytes
import unittest
from pyvarnish.parse_stats import VarnishGather, msg
class TestVarnishGather(unittest.TestCase):
""""""
def test_parse_xml(self):
"""Constructor"""
server = "mytestserver"
vg = VarnishGather(server)
vg.parse_xml("test_data.xml")
message = msg(vg.lines)
self.assertEqual(message.strip(), open("test_message.txt").read())
if __name__ == '__main__':
unittest.main()
Something went wrong with that request. Please try again.