示例#1
0
 def test_comment_parsing(self):
     """
     Tests that comment gets parsed correctly
     """
     xml_tree = et.fromstring(TestUfedLocation.test_elem)
     ul = ufed_geo2csv.UfedLocation(xml_tree)
     self.assertEqual(ul.comment, "A Comment")
示例#2
0
 def test_source_index_parsing(self):
     """
     Tests that source index gets parsed correctly
     """
     xml_tree = et.fromstring(TestUfedLocation.test_elem)
     ul = ufed_geo2csv.UfedLocation(xml_tree)
     self.assertEqual(ul.deleted_state, "Unknown")
示例#3
0
 def test_source_parsing(self):
     """
     Tests that source entry gets parsed correctly
     """
     xml_tree = et.fromstring(TestUfedLocation.test_elem)
     ul = ufed_geo2csv.UfedLocation(xml_tree)
     self.assertEqual(ul.name, "3235326112452127.jpg")
示例#4
0
 def test_category_parsing(self):
     """
     Tests that category gets parsed correctly
     """
     xml_tree = et.fromstring(TestUfedLocation.test_elem)
     ul = ufed_geo2csv.UfedLocation(xml_tree)
     self.assertEqual(ul.category, "Media Locations")
示例#5
0
 def test_timestamp_parsing(self):
     """
     Tests that longitude gets parsed correctly
     """
     xml_tree = et.fromstring(TestUfedLocation.test_elem)
     ul = ufed_geo2csv.UfedLocation(xml_tree)
     self.assertEqual(ul.ts, "2020-12-16T11:53:14+01:00")
示例#6
0
 def test_lon_parsing(self):
     """
     Tests that longitude gets parsed correctly
     """
     xml_tree = et.fromstring(TestUfedLocation.test_elem)
     ul = ufed_geo2csv.UfedLocation(xml_tree)
     self.assertEqual(ul.lon, float(12.21851))
示例#7
0
 def test_lat_parsing(self):
     """
     Tests that latitude gets parsed correctly
     """
     xml_tree = et.fromstring(TestUfedLocation.test_elem)
     ul = ufed_geo2csv.UfedLocation(xml_tree)
     self.assertEqual(ul.lat, float(52.3461117))
示例#8
0
 def test_matching_extra_info_parsing(self):
     """
     Tests that extraInfo gets parsed correctly
     """
     xml_tree = et.fromstring(TestUfedLocation.test_elem)
     extra_info_tree = et.fromstring(TestUfedLocation.extra_info_matching)
     ul = ufed_geo2csv.UfedLocation(xml_tree, extra_info_tree)
     self.assertEqual(
         ul.path,
         "NO NAME/DCIM/Camera/20180720_175843.jpg/20200720_175243.jpg_embedded_1_partial.jpg"
     )
     self.assertEqual(ul.size, 1590096)