def test_to_xml_will_generate_proper_xml_string(self):
    'testing if a proper xml compatible string will be generated with\n        to_xml() method\n        '
    path = os.path.abspath('./test_data/test_v001.xml')
    sm = pymel.core.PyNode('sequenceManager1')
    sm.set_shot_name_template('<Sequence>_<Shot>_<Version>')
    sm.set_version('v001')
    seq1 = sm.create_sequence('SEQ001_HSNI_003')
    shot1 = seq1.create_shot('0010')
    shot1.startFrame.set(0)
    shot1.endFrame.set(33)
    shot1.sequenceStartFrame.set(1)
    shot1.output.set('/tmp/SEQ001_HSNI_003_0010_v001.mov')
    shot1.handle.set(10)
    shot1.track.set(1)
    shot2 = seq1.create_shot('0020')
    shot2.startFrame.set(34)
    shot2.endFrame.set(64)
    shot2.sequenceStartFrame.set(35)
    shot2.output.set('/tmp/SEQ001_HSNI_003_0020_v001.mov')
    shot2.handle.set(10)
    shot2.track.set(1)
    shot3 = seq1.create_shot('0030')
    shot3.startFrame.set(65)
    shot3.endFrame.set(110)
    shot3.sequenceStartFrame.set(66)
    shot3.output.set('/tmp/SEQ001_HSNI_003_0030_v001.mov')
    shot3.handle.set(10)
    shot3.track.set(1)
    self.assertEqual(shot1.track.get(), 1)
    self.assertEqual(shot2.track.get(), 1)
    self.assertEqual(shot3.track.get(), 1)
    result = sm.to_xml()
    with open(path) as f:
        expected = f.read()
    self.maxDiff = None
    self.assertEqual(expected, result)
testing if a proper xml compatible string will be generated with
to_xml() method
def test_to_xml_will_generate_proper_xml_string(self):
    'testing if a proper xml compatible string will be generated with\n        to_xml() method\n        '
    path = os.path.abspath('./test_data/test_v001.xml')
    sm = pymel.core.PyNode('sequenceManager1')
    sm.set_shot_name_template('<Sequence>_<Shot>_<Version>')
    sm.set_version('v001')
    seq1 = sm.create_sequence('SEQ001_HSNI_003')
    shot1 = seq1.create_shot('0010')
    shot1.startFrame.set(0)
    shot1.endFrame.set(33)
    shot1.sequenceStartFrame.set(1)
    shot1.output.set('/tmp/SEQ001_HSNI_003_0010_v001.mov')
    shot1.handle.set(10)
    shot1.track.set(1)
    shot2 = seq1.create_shot('0020')
    shot2.startFrame.set(34)
    shot2.endFrame.set(64)
    shot2.sequenceStartFrame.set(35)
    shot2.output.set('/tmp/SEQ001_HSNI_003_0020_v001.mov')
    shot2.handle.set(10)
    shot2.track.set(1)
    shot3 = seq1.create_shot('0030')
    shot3.startFrame.set(65)
    shot3.endFrame.set(110)
    shot3.sequenceStartFrame.set(66)
    shot3.output.set('/tmp/SEQ001_HSNI_003_0030_v001.mov')
    shot3.handle.set(10)
    shot3.track.set(1)
    self.assertEqual(shot1.track.get(), 1)
    self.assertEqual(shot2.track.get(), 1)
    self.assertEqual(shot3.track.get(), 1)
    result = sm.to_xml()
    with open(path) as f:
        expected = f.read()
    self.maxDiff = None
    self.assertEqual(expected, result)