mirror of
https://github.com/sartography/spiff-arena.git
synced 2025-01-30 19:25:43 +00:00
0892db6fa7
git-subtree-dir: SpiffWorkflow git-subtree-split: 63db3e45947ec66b8d0efc2c74064004f8ff482c
30 lines
791 B
Python
30 lines
791 B
Python
# -*- coding: utf-8 -*-
|
|
|
|
import sys
|
|
import unittest
|
|
import os
|
|
dirname = os.path.dirname(__file__)
|
|
sys.path.insert(0, os.path.join(dirname, '..'))
|
|
sys.path.insert(0, os.path.join(dirname, '..', '..', '..'))
|
|
|
|
from lxml import etree
|
|
from SpiffWorkflow.serializer.xml import XmlSerializer
|
|
from serializer.baseTest import SerializerTest
|
|
|
|
|
|
class XmlSerializerTest(SerializerTest):
|
|
|
|
def setUp(self):
|
|
super(XmlSerializerTest, self).setUp()
|
|
self.serializer = XmlSerializer()
|
|
self.return_type = etree._Element
|
|
|
|
def _prepare_result(self, item):
|
|
return etree.tostring(item, pretty_print=True)
|
|
|
|
|
|
def suite():
|
|
return unittest.TestLoader().loadTestsFromTestCase(XmlSerializerTest)
|
|
if __name__ == '__main__':
|
|
unittest.TextTestRunner(verbosity=2).run(suite())
|