2 Library for the robot based system test tool of the OpenDaylight project.
3 Authors: Baohua Yang@IBM, Denghui Huang@IBM
7 import xml.etree.ElementTree as ET
10 Common constants and functions for the robot framework.
13 def collection_should_contain(collection, *members):
15 Fail if not every members is in the collection.
17 if not isinstance(collection, collections.Iterable):
20 if m not in collection:
25 def combine_strings(*strings):
27 Combines the given `strings` together and returns the result.
28 The given strings are not altered by this keyword.
32 if isinstance(s,str) or isinstance(s,unicode):
40 def compare_xml(xml1, xml2):
42 compare the two XML files to see if they contain the same data
43 but could be if different order.
44 It just split the xml in to lines and just check the line is in
47 for line in xml1.rstrip().split('\n'):
48 if line not in xml2.rstrip().split('\n'):
51 for line in xml2.rstrip().split('\n'):
52 if line not in xml1.rstrip().split('\n'):
60 if __name__ == '__main__':