Example #1
0
 def test_split_gps_components_works_when_gps_data_is_blank(self):
     gps_fields =\
         {
             'geo/geolocation':
             [
                 'geo/_geolocation_latitude', 'geo/_geolocation_longitude',
                 'geo/_geolocation_altitude', 'geo/_geolocation_precision'
             ]
         }
     row = \
         {
             'geo/geolocation': '',
         }
     new_row = ExportBuilder.split_gps_components(row, gps_fields)
     expected_row = \
         {
             'geo/geolocation': '',
         }
     self.assertEqual(new_row, expected_row)
Example #2
0
 def test_split_gps_components_works_when_gps_data_is_blank(self):
     gps_fields =\
         {
             'geo/geolocation':
             [
                 'geo/_geolocation_latitude', 'geo/_geolocation_longitude',
                 'geo/_geolocation_altitude', 'geo/_geolocation_precision'
             ]
         }
     row = \
         {
             'geo/geolocation': '',
         }
     new_row = ExportBuilder.split_gps_components(
         row, gps_fields)
     expected_row = \
         {
             'geo/geolocation': '',
         }
     self.assertEqual(new_row, expected_row)
Example #3
0
 def test_split_gps_components_works(self):
     gps_fields =\
         {
             'geo/geolocation':
             [
                 'geo/_geolocation_latitude', 'geo/_geolocation_longitude',
                 'geo/_geolocation_altitude', 'geo/_geolocation_precision'
             ]
         }
     row = \
         {
             'geo/geolocation': '1.0 36.1 2000 20',
         }
     new_row = ExportBuilder.split_gps_components(row, gps_fields)
     expected_row = \
         {
             'geo/geolocation': '1.0 36.1 2000 20',
             'geo/_geolocation_latitude': '1.0',
             'geo/_geolocation_longitude': '36.1',
             'geo/_geolocation_altitude': '2000',
             'geo/_geolocation_precision': '20'
         }
     self.assertEqual(new_row, expected_row)
Example #4
0
 def test_split_gps_components_works(self):
     gps_fields =\
         {
             'geo/geolocation':
             [
                 'geo/_geolocation_latitude', 'geo/_geolocation_longitude',
                 'geo/_geolocation_altitude', 'geo/_geolocation_precision'
             ]
         }
     row = \
         {
             'geo/geolocation': '1.0 36.1 2000 20',
         }
     new_row = ExportBuilder.split_gps_components(
         row, gps_fields)
     expected_row = \
         {
             'geo/geolocation': '1.0 36.1 2000 20',
             'geo/_geolocation_latitude': '1.0',
             'geo/_geolocation_longitude': '36.1',
             'geo/_geolocation_altitude': '2000',
             'geo/_geolocation_precision': '20'
         }
     self.assertEqual(new_row, expected_row)