{
  "create_collation": [
    {
      "name": "Create collation: With valid data",
      "url": "/browser/collation/obj/",
      "is_positive_test": true,
      "test_data": {
            "copy_collation": "PLACE_HOLDER",
            "name": "PLACE_HOLDER",
            "owner": "PLACE_HOLDER",
            "schema": "PLACE_HOLDER"
      },
      "mocking_required": false,
      "mock_data": {},
      "expected_data": {
        "status_code": 200
      },
      "inventory_data": {
        "server_min_version": 160000,
        "skip_msg": "Create collation: With valid data are not supported by PG 16.0 and below."
      }
    },
    {
      "name": "Create collation: With invalid data - Missing Parameter.",
      "url": "/browser/collation/obj/",
      "is_positive_test": false,
      "parameter_missing": true,
      "test_data": {
            "copy_collation": "PLACE_HOLDER",
            "name": "PLACE_HOLDER",
            "owner": "PLACE_HOLDER",
            "schema": "PLACE_HOLDER"
      },
      "mocking_required": false,
      "mock_data": {},
      "expected_data": {
        "status_code": 410,
        "error_msg": "Could not find the required parameter (name)."
      }
    },
    {
      "name": "Create collation: With invalid data - Incomplete Definition.",
      "url": "/browser/collation/obj/",
      "is_positive_test": false,
      "error_incomplete_definition": true,
      "test_data": {
            "copy_collation": "PLACE_HOLDER",
            "name": "PLACE_HOLDER",
            "owner": "PLACE_HOLDER",
            "schema": "PLACE_HOLDER"
      },
      "mocking_required": false,
      "mock_data": {},
      "expected_data": {
        "status_code": 410
      }
    },
    {
      "name": "Error while getting oid of newly created collation",
      "url": "/browser/collation/obj/",
      "error_getting_collation_oid": true,
      "is_positive_test": false,
      "test_data": {
            "copy_collation": "PLACE_HOLDER",
            "name": "PLACE_HOLDER",
            "owner": "PLACE_HOLDER",
            "schema": "PLACE_HOLDER"

      },
      "mocking_required": true,
      "mock_data": {
        "function_name": "pgadmin.utils.driver.psycopg3.connection.Connection.execute_scalar",
        "return_value": "(True, True), (False, 'Mocked Internal Server Error while getting oid of created collation')"
      },
      "expected_data": {
        "status_code": 500
      }
    },
    {
      "name": "Error while creating a collation - res - Internal server error",
      "url": "/browser/collation/obj/",
      "internal_server_error": true,
      "is_positive_test": false,
      "test_data": {
            "copy_collation": "PLACE_HOLDER",
            "name": "PLACE_HOLDER",
            "owner": "PLACE_HOLDER",
            "schema": "PLACE_HOLDER"
      },
      "mocking_required": true,
      "mock_data": {
        "function_name": "pgadmin.utils.driver.psycopg3.connection.Connection.execute_scalar",
        "return_value": "(False, 'Mocked Internal Server Error')"
      },
      "expected_data": {
        "status_code": 500
      }
    }
  ],
  "get_collation": [
    {
      "name": "Get Collation",
      "url": "/browser/collation/obj/",
      "is_positive_test": true,
      "mocking_required": false,
      "mock_data": {},
      "expected_data": {
        "status_code": 200
      }
    },
    {
      "name": "Error while fetching a Collation",
      "url": "/browser/collation/obj/",
      "error_fetching_collation": true,
      "is_positive_test": false,
      "mocking_required": true,
      "mock_data": {
        "function_name": "pgadmin.utils.driver.psycopg3.connection.Connection.execute_dict",
        "return_value": "(False, 'Mocked Internal Server Error while fetching a collation')"
      },
      "expected_data": {
        "status_code": 500
      }
    },
    {
      "name": "Fetch collation using wrong collation id",
      "url": "/browser/collation/obj/",
      "wrong_collation_id": true,
      "is_positive_test": false,
      "mocking_required": false,
      "mock_data": {
      },
      "expected_data": {
        "status_code": 410
      }
    },
    {
      "name": "Get Collation list",
      "url": "/browser/collation/obj/",
      "is_positive_test": true,
      "collation_list": true,
      "mocking_required": false,
      "mock_data": {},
      "expected_data": {
        "status_code": 200
      }
    },
    {
      "name": "Error while fetching Collation list",
      "url": "/browser/collation/obj/",
      "error_fetching_collation": true,
      "is_positive_test": false,
      "collation_list": true,
      "mocking_required": true,
      "mock_data": {
        "function_name": "pgadmin.utils.driver.psycopg3.connection.Connection.execute_dict",
        "return_value": "(False, 'Mocked Internal Server Error while fetching a collation')"
      },
      "expected_data": {
        "status_code": 500
      }
    }
  ],
  "delete_collation": [
    {
      "name": "delete Collation",
      "url": "/browser/collation/obj/",
      "is_positive_test": true,
      "mocking_required": false,
      "mock_data": {},
      "expected_data": {
        "status_code": 200
      }
    },
    {
      "name": "Error while deleting a Collation",
      "url": "/browser/collation/obj/",
      "error_deleting_collation": true,
      "is_positive_test": false,
      "mocking_required": true,
      "mock_data": {
        "function_name": "pgadmin.utils.driver.psycopg3.connection.Connection.execute_dict",
        "return_value": "(False, 'Mocked Internal Server Error while deleting a collation')"
      },
      "expected_data": {
        "status_code": 500
      }
    },
    {
      "name": "delete collation using wrong collation id",
      "url": "/browser/collation/obj/",
      "wrong_collation_id": true,
      "is_positive_test": false,
      "mocking_required": false,
      "mock_data": {
      },
      "expected_data": {
        "status_code": 410
      }
    },
    {
      "name": "Error while deleting a created Collation",
      "url": "/browser/collation/obj/",
      "error_deleting_created_collation": true,
      "is_positive_test": false,
      "mocking_required": true,
      "mock_data": {
        "function_name": "pgadmin.utils.driver.psycopg3.connection.Connection.execute_scalar",
        "return_value": "(False, 'Mocked Internal Server Error while deleting a collation')"
      },
      "expected_data": {
        "status_code": 500
      }
    }
  ],
  "update_collation": [
    {
      "name": "Update Collation",
      "url": "/browser/collation/obj/",
      "is_positive_test": true,
      "mocking_required": false,
      "test_data": {
        "description": "This is collation update comment",
        "id": "PLACE_HOLDER"
      },
      "mock_data": {},
      "expected_data": {
        "status_code": 200
      }
    },
    {
      "name": "Error while updating a Collation",
      "url": "/browser/collation/obj/",
      "error_updating_collation": true,
      "test_data": {
        "description": "This is collation update comment",
        "id": "PLACE_HOLDER"
      },
      "is_positive_test": false,
      "mocking_required": true,
      "mock_data": {
        "function_name": "pgadmin.utils.driver.psycopg3.connection.Connection.execute_scalar",
        "return_value": "(False, 'Mocked Internal Server Error while fetching a collation')"
      },
      "expected_data": {
        "status_code": 500
      }
    },
    {
      "name": "Error while updating a Collation",
      "url": "/browser/collation/obj/",
      "internal_server_error": true,
      "is_positive_test": false,
      "test_data": {
        "description": "This is collation update comment",
        "id": "PLACE_HOLDER"
      },
      "mocking_required": true,
      "mock_data": {
        "function_name": "pgadmin.utils.driver.psycopg3.connection.Connection.execute_2darray",
        "return_value": "(False, 'Mocked Internal Server Error while fetching a collation')"
      },
      "expected_data": {
        "status_code": 500
      }
    }
  ],
  "dependency_dependent_collation": [
    {
      "name": "Get Collation dependency",
      "url": "/browser/collation/dependency/",
      "is_positive_test": true,
      "mocking_required": false,
      "mock_data": {},
      "expected_data": {
        "status_code": 200
      }
    },
    {
      "name": "Get Collation dependent",
      "url": "/browser/collation/dependent/",
      "is_positive_test": true,
      "mocking_required": false,
      "mock_data": {},
      "expected_data": {
        "status_code": 200
      }
    }
  ],
  "get_collation_nodes_and_node": [
    {
      "name": "Get Collation nodes",
      "url": "/browser/collation/nodes/",
      "is_positive_test": true,
      "mocking_required": false,
      "mock_data": {},
      "expected_data": {
        "status_code": 200
      }
    },
    {
      "name": "Error while fetching Collation nodes",
      "url": "/browser/collation/nodes/",
      "error_fetching_collation": true,
      "is_positive_test": false,
      "mocking_required": true,
      "mock_data": {
        "function_name": "pgadmin.utils.driver.psycopg3.connection.Connection.execute_2darray",
        "return_value": "(False, 'Mocked Internal Server Error while fetching collation nodes')"
      },
      "expected_data": {
        "status_code": 500
      }
    },
    {
      "name": "Get Collation node",
      "url": "/browser/collation/nodes/",
      "is_positive_test": true,
      "node": true,
      "mocking_required": false,
      "mock_data": {},
      "expected_data": {
        "status_code": 200
      }
    },
    {
      "name": "Error while fetching Collation node",
      "url": "/browser/collation/nodes/",
      "error_fetching_collation": true,
      "is_positive_test": false,
      "node": true,
      "mocking_required": true,
      "mock_data": {
        "function_name": "pgadmin.utils.driver.psycopg3.connection.Connection.execute_2darray",
        "return_value": "(False, 'Mocked Internal Server Error while fetching collation nodes')"
      },
      "expected_data": {
        "status_code": 500
      }
    }
  ],
  "get_collation_func": [
    {
      "name": "Get get_collation",
      "url": "/browser/collation/get_collations/",
      "is_positive_test": true,
      "mocking_required": false,
      "mock_data": {},
      "expected_data": {
        "status_code": 200
      }
    },
    {
      "name": "Error while fetching collations: With valid data while server down",
      "url": "/browser/collation/get_collations/",
      "is_positive_test": false,
      "mocking_required": true,
      "mock_data": {
        "function_name": "pgadmin.utils.driver.psycopg3.connection.Connection.execute_2darray",
        "return_value": "(False, 'Mocked Internal Server Error while fetching collations')"
      },
      "expected_data": {
        "status_code": 500
      }
    }
  ],
  "delete_multiple_collation" :[
    {
      "name": "Delete multiple Collation",
      "url": "/browser/collation/obj/",
      "is_positive_test": true,
      "mocking_required": false,
      "mock_data": {},
      "expected_data": {
        "status_code": 200
      }
    }
  ],
  "get_collation_sql": [
    {
      "name": "Get Collation SQL",
      "url": "/browser/collation/sql/",
      "is_positive_test": true,
      "mocking_required": false,
      "mock_data": {},
      "expected_data": {
        "status_code": 200
      }
    },
    {
      "name": "Error while fetching a created Collation sql",
      "url": "/browser/collation/sql/",
      "error_fetching_collation": true,
      "is_positive_test": false,
      "mocking_required": true,
      "mock_data": {
        "function_name": "pgadmin.utils.driver.psycopg3.connection.Connection.execute_dict",
        "return_value": "(False, 'Mocked Internal Server Error while fetching a collation sql')"
      },
      "expected_data": {
        "status_code": 500
      }
    },
    {
      "name": "Get collation msql: With existing collation id.",
      "url": "/browser/collation/msql/",
      "is_positive_test": true,
      "msql": true,
      "mocking_required": false,
      "mock_data": {},
      "expected_data": {
        "status_code": 200,
        "error_msg": null,
        "test_result_data": {}
      },
      "is_list": false
    }
  ]
}
