def test_rate_attribute_is_valid_to_xml_is_working_properly(self): """testing if the rate attribute will be included int the xml output if it is not None """ f = File() f.duration = 34 f.name = 'shot2' f.pathurl = 'file://localhost/home/eoyilmaz/maya/projects/default/data/shot2.mov' c = Clip() c.id = 'shot2' c.start = 1 c.end = 35 c.name = 'shot2' c.enabled = True c.duration = 34 c.in_ = 0 c.out = 34 c.file = f c.rate = Rate(timebase='25') expected_xml = \ """<clipitem id="shot2"> <end>35</end> <name>shot2</name> <enabled>True</enabled> <start>1</start> <in>0</in> <duration>34</duration> <rate> <timebase>25</timebase> <ntsc>FALSE</ntsc> </rate> <out>34</out> <file id="shot2.mov"> <duration>34</duration> <name>shot2</name> <pathurl>file://localhost/home/eoyilmaz/maya/projects/default/data/shot2.mov</pathurl> </file> </clipitem>""" self.maxDiff = None self.assertEqual( expected_xml, c.to_xml() )
def test_rate_attribute_is_valid_to_xml_is_working_properly(self): """testing if the rate attribute will be included int the xml output if it is not None """ f = File() f.duration = 34 f.name = 'shot2' f.pathurl = 'file://localhost/home/eoyilmaz/maya/projects/default/data/shot2.mov' c = Clip() c.id = 'shot2' c.start = 1 c.end = 35 c.name = 'shot2' c.enabled = True c.duration = 34 c.in_ = 0 c.out = 34 c.file = f c.rate = Rate(timebase='25') expected_xml = \ """<clipitem id="shot2"> <end>35</end> <name>shot2</name> <enabled>True</enabled> <start>1</start> <in>0</in> <duration>34</duration> <rate> <timebase>25</timebase> <ntsc>FALSE</ntsc> </rate> <out>34</out> <file id="shot2.mov"> <duration>34</duration> <name>shot2</name> <pathurl>file://localhost/home/eoyilmaz/maya/projects/default/data/shot2.mov</pathurl> </file> </clipitem>""" self.maxDiff = None self.assertEqual(expected_xml, c.to_xml())
def test_to_xml_method_is_working_properly(self): """testing if the to xml method is working properly """ f = File() f.duration = 34 f.name = 'shot2' f.pathurl = 'file://localhost/home/eoyilmaz/maya/projects/default/data/shot2.mov' c = Clip() c.id = 'shot2' c.start = 1 c.end = 35 c.name = 'shot2' c.enabled = True c.duration = 34 c.in_ = 0 c.out = 34 c.file = f expected_xml = \ """<clipitem id="shot2"> <end>35</end> <name>shot2</name> <enabled>True</enabled> <start>1</start> <in>0</in> <duration>34</duration> <out>34</out> <file id="shot2.mov"> <duration>34</duration> <name>shot2</name> <pathurl>file://localhost/home/eoyilmaz/maya/projects/default/data/shot2.mov</pathurl> </file> </clipitem>""" self.assertEqual( expected_xml, c.to_xml() )
def test_to_xml_method_is_working_properly(self): """testing if the to xml method is working properly """ f = File() f.duration = 34.0 f.name = 'shot2' f.pathurl = 'file:///home/eoyilmaz/maya/projects/default/data/shot2.mov' c = Clip() c.id = 'shot2' c.start = 1.0 c.end = 35.0 c.name = 'shot2' c.enabled = True c.duration = 34.0 c.in_ = 0.0 c.out = 34.0 c.file = f expected_xml = \ """<clipitem id="shot2"> <end>35.0</end> <name>shot2</name> <enabled>True</enabled> <start>1.0</start> <in>0.0</in> <duration>34.0</duration> <out>34.0</out> <file> <duration>34.0</duration> <name>shot2</name> <pathurl>file:///home/eoyilmaz/maya/projects/default/data/shot2.mov</pathurl> </file> </clipitem>""" self.assertEqual(expected_xml, c.to_xml())