Skip to content

Commit

Permalink
Add regression test re #11716
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobtylerwalls committed Jan 17, 2025
1 parent da52ea9 commit 61b5b65
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/search/search_export_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
from django.contrib.auth.models import User
from django.test.client import RequestFactory
from django.urls import reverse
from django.urls.base import get_script_prefix, set_script_prefix

from arches.app.views.api import SearchExport
from tests.base_test import ArchesTestCase
Expand Down Expand Up @@ -227,6 +228,16 @@ def test_login_via_basic_auth_invalid(self):
self.assertEqual(request.user.username, "anonymous")
self.assertEqual(response.status_code, HTTPStatus.UNAUTHORIZED)

def test_script_prefix(self):
prefix = get_script_prefix()
set_script_prefix("/nginx")
self.addCleanup(set_script_prefix, prefix)

request = self.factory.get("/search?tiles=True&export=True&format=tilecsv")
request.user = self.user
exporter = SearchResultsExporter(search_request=request)
exporter.export(format="tilecsv", report_link="false")


def is_valid_uuid(value, version=4):
"""Check if value is a valid UUID."""
Expand Down

0 comments on commit 61b5b65

Please sign in to comment.