Esempio n. 1
0
 def test_download_file(self):
     self.logger.debug("\n*******************************************************************************")
     self.logger.debug('\nTest download table data for: world_borders')
     self.logger.debug("\n*******************************************************************************")
     cartodbApi = CartoDBApi(cartodb_user, api_key, is_multiuser)
     cartodbApi.fetchContent.connect(self.signalsObject.cb_download_file)
     cartodbApi.download('SELECT * FROM world_borders LIMIT 10')
Esempio n. 2
0
 def test_get_table_data(self):
     self.logger.debug("\n*******************************************************************************")
     self.logger.debug('\nTest table data for: world_borders')
     self.logger.debug("\n*******************************************************************************")
     cartodbApi = CartoDBApi(cartodb_user, api_key, is_multiuser)
     cartodbApi.fetchContent.connect(self.signalsObject.cb_show_table_data)
     cartodbApi.getDataFromTable('SELECT * FROM world_borders LIMIT 10')
Esempio n. 3
0
 def test_get_layers_map(self):
     self.logger.debug("\n*******************************************************************************")
     self.logger.debug('\nTest get layers in map: Test map from QGISCartoDB 3')
     self.logger.debug("\n*******************************************************************************")
     cartodbApi = CartoDBApi(cartodb_user, api_key, is_multiuser)
     cartodbApi.fetchContent.connect(self.signalsObject.cb_get_layers_map_result)
     cartodbApi.getLayersMap(test_map)
Esempio n. 4
0
 def test_get_layers_map(self):
     self.logger.debug("\n*******************************************************************************")
     self.logger.debug("\nTest get layers in map: Test map from QGISCartoDB 3")
     self.logger.debug("\n*******************************************************************************")
     cartodbApi = CartoDBApi(cartodb_user, api_key, is_multiuser)
     cartodbApi.fetchContent.connect(self.signalsObject.cb_get_layers_map_result)
     cartodbApi.getLayersMap("df48f415-2ed5-4aaa-ac73-ded9d64f5bd3")
Esempio n. 5
0
 def test_get_table_data(self):
     self.logger.debug("\n*******************************************************************************")
     self.logger.debug("\nTest table data for: world_borders")
     self.logger.debug("\n*******************************************************************************")
     cartodbApi = CartoDBApi(cartodb_user, api_key, is_multiuser)
     cartodbApi.fetchContent.connect(self.signalsObject.cb_show_table_data)
     cartodbApi.getDataFromTable("SELECT * FROM world_borders LIMIT 10")
Esempio n. 6
0
 def test_show_user_data(self):
     self.logger.debug("\n*******************************************************************************")
     self.logger.debug('\nTest get user details for: ' + cartodb_user)
     self.logger.debug("\n*******************************************************************************")
     cartodbApi = CartoDBApi(cartodb_user, api_key, is_multiuser)
     cartodbApi.fetchContent.connect(self.signalsObject.cb_show_user_data)
     cartodbApi.getUserDetails()
Esempio n. 7
0
 def test_create_viz_from_table(self):
     self.logger.debug("\n*******************************************************************************")
     self.logger.debug("\nTest create viz from table. Name: Test map from QGISCartoDB")
     self.logger.debug("\n*******************************************************************************")
     cartodbApi = CartoDBApi(cartodb_user, api_key, is_multiuser)
     cartodbApi.fetchContent.connect(self.signalsObject.cb_show_create_viz_result)
     cartodbApi.createVizFromTable("test_ideca_manzanas", "Test map from QGISCartoDB", "Test map from Description")
Esempio n. 8
0
 def test_download_file(self):
     self.logger.debug("\n*******************************************************************************")
     self.logger.debug("\nTest download table data for: world_borders")
     self.logger.debug("\n*******************************************************************************")
     cartodbApi = CartoDBApi(cartodb_user, api_key, is_multiuser)
     cartodbApi.fetchContent.connect(self.signalsObject.cb_download_file)
     cartodbApi.download("SELECT * FROM world_borders LIMIT 10")
Esempio n. 9
0
 def test_show_user_tables(self):
     self.logger.debug("\n*******************************************************************************")
     self.logger.debug('\nTest get user tables for: ' + cartodb_user)
     self.logger.debug("\n*******************************************************************************")
     cartodbApi = CartoDBApi(cartodb_user, api_key, is_multiuser)
     cartodbApi.fetchContent.connect(self.signalsObject.cb_show_user_tables)
     cartodbApi.getUserTables()
Esempio n. 10
0
 def test_show_user_tables(self):
     self.logger.debug("\n*******************************************************************************")
     self.logger.debug("\nTest get user tables for: " + cartodb_user)
     self.logger.debug("\n*******************************************************************************")
     cartodbApi = CartoDBApi(cartodb_user, api_key, is_multiuser)
     cartodbApi.fetchContent.connect(self.signalsObject.cb_show_user_tables)
     cartodbApi.getUserTables()
Esempio n. 11
0
 def test_create_viz_from_table(self):
     self.logger.debug("\n*******************************************************************************")
     self.logger.debug('\nTest create viz from table. Name: Test map from QGISCartoDB')
     self.logger.debug("\n*******************************************************************************")
     cartodbApi = CartoDBApi(cartodb_user, api_key, is_multiuser)
     cartodbApi.fetchContent.connect(self.signalsObject.cb_show_create_viz_result)
     cartodbApi.createVizFromTable('test_ideca_cuerpos_agua', 'Test map from QGISCartoDB', 'Test map from Description')
Esempio n. 12
0
 def test_upload_file_status(self):
     self.logger.debug("\n*******************************************************************************")
     self.logger.debug('\nTest upload file status for shape: constituencies.zip')
     self.logger.debug("\n*******************************************************************************")
     cartodbApi = CartoDBApi(cartodb_user, api_key, is_multiuser)
     cartodbApi.fetchContent.connect(self.signalsObject.cb_show_upload_status_result)
     cartodbApi.checkUploadStatus('53dc786b-6013-4e7f-977c-5136f9828494')
Esempio n. 13
0
 def test_add_layer_to_map(self):
     self.logger.debug("\n*******************************************************************************")
     self.logger.debug("\nTest add layer to map. Layer: test_ideca_localidades")
     self.logger.debug("\n*******************************************************************************")
     cartodbApi = CartoDBApi(cartodb_user, api_key, is_multiuser)
     cartodbApi.fetchContent.connect(self.signalsObject.cb_add_layer_to_map_result)
     cartoCSS = "#test_ideca_localidades { polygon-fill: #7B00B4; polygon-opacity: 0.6; line-color: #0F3B82; line-width: 0.5; line-opacity: 1; }"
     cartodbApi.addLayerToMap("df48f415-2ed5-4aaa-ac73-ded9d64f5bd3", "test_ideca_localidades", cartoCSS)
Esempio n. 14
0
 def test_add_layer_to_map(self):
     self.logger.debug("\n*******************************************************************************")
     self.logger.debug('\nTest add layer to map. Layer: test_ideca_localidades')
     self.logger.debug("\n*******************************************************************************")
     cartodbApi = CartoDBApi(cartodb_user, api_key, is_multiuser)
     cartodbApi.fetchContent.connect(self.signalsObject.cb_add_layer_to_map_result)
     cartoCSS = '#test_ideca_localidades { polygon-fill: #7B00B4; polygon-opacity: 0.6; line-color: #0F3B82; line-width: 0.5; line-opacity: 1; }'
     cartodbApi.addLayerToMap(test_map, 'test_ideca_localidades', cartoCSS)
Esempio n. 15
0
 def test_upload_file(self):
     self.logger.debug("\n*******************************************************************************")
     self.logger.debug("\nTest upload shape: constituencies.zip")
     self.logger.debug("\n*******************************************************************************")
     cartodbApi = CartoDBApi(cartodb_user, api_key, is_multiuser)
     cartodbApi.fetchContent.connect(self.signalsObject.cb_show_upload_result)
     cartodbApi.progress.connect(self.signalsObject.cb_progress)
     path = os.path.dirname(os.path.abspath(__file__))
     path = os.path.join(path, "data")
     path = os.path.join(path, "constituencies.zip")
     cartodbApi.upload(path)
Esempio n. 16
0
 def test_upload_file(self):
     self.logger.debug("\n*******************************************************************************")
     self.logger.debug('\nTest upload shape: constituencies.zip')
     self.logger.debug("\n*******************************************************************************")
     cartodbApi = CartoDBApi(cartodb_user, api_key, is_multiuser)
     cartodbApi.fetchContent.connect(self.signalsObject.cb_show_upload_result)
     cartodbApi.progress.connect(self.signalsObject.cb_progress)
     path = os.path.dirname(os.path.abspath(__file__))
     path = os.path.join(path, upload_file)
     # path = '/home/elesdoar/Documents/QGIS CartoDB/lotes_simplificados.zip'
     cartodbApi.upload(path)
Esempio n. 17
0
 def test_upload_file(self):
     self.logger.debug(
         "\n*******************************************************************************"
     )
     self.logger.debug('\nTest upload shape: constituencies.zip')
     self.logger.debug(
         "\n*******************************************************************************"
     )
     cartodbApi = CartoDBApi(cartodb_user, api_key, is_multiuser)
     cartodbApi.fetchContent.connect(
         self.signalsObject.cb_show_upload_result)
     cartodbApi.progress.connect(self.signalsObject.cb_progress)
     path = os.path.dirname(os.path.abspath(__file__))
     path = os.path.join(path, 'data')
     path = os.path.join(path, 'constituencies.zip')
     cartodbApi.upload(path)