Skip to content

Commit 69a6087

Browse files
committed
[Fixes #13617] Corrected the test case as now used ogr to copy the data
1 parent c0ba810 commit 69a6087

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

geonode/upload/tests/unit/test_task.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -730,9 +730,7 @@ def test_copy_dynamic_model_should_work(self, async_call):
730730
FieldSchema.objects.filter(name="field_").delete()
731731

732732
@patch("geonode.upload.celery_tasks.import_orchestrator.apply_async")
733-
@patch("geonode.upload.celery_tasks.connections")
734-
def test_copy_geonode_data_table_should_work(self, mock_connection, async_call):
735-
mock_cursor = mock_connection.__getitem__("datastore").cursor.return_value.__enter__.return_value
733+
def test_copy_geonode_data_table_should_work(self, async_call):
736734
ModelSchema.objects.create(name=f"schema_copy_{str(self.exec_id)}", db_name="datastore")
737735

738736
copy_geonode_data_table(
@@ -747,6 +745,4 @@ def test_copy_geonode_data_table_should_work(self, mock_connection, async_call):
747745
"new_dataset_alternate": f"schema_copy_{str(self.exec_id)}", # this alternate is generated dring the geonode resource copy
748746
},
749747
)
750-
mock_cursor.execute.assert_called_once()
751-
mock_cursor.execute.assert_called()
752748
async_call.assert_called_once()

0 commit comments

Comments
 (0)