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 1a512b4 commit f6062d6
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 1 deletion.
31 changes: 31 additions & 0 deletions releases/7.6.5.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
## Arches 7.6.5 Release Notes

### Bug Fixes and Enhancements

- Fix search export when `FORCE_SCRIPT_NAME` is used #[11716](https://github.com/archesproject/arches/issues/11716)

### Dependency changes:

```
Python:
Upgraded:
none
JavaScript:
Upgraded:
none
```

### Upgrading Arches

1. Upgrade to version 7.6.0 before proceeding by following the upgrade process in the [Version 7.6.0 release notes](https://github.com/archesproject/arches/blob/dev/7.6.x/releases/7.6.0.md)

2. Upgrade to Arches 7.6.5

```
pip install --upgrade arches==7.6.5
```
3. If you are running Arches on Apache, restart your server:
```
sudo service apache2 reload
```
12 changes: 11 additions & 1 deletion tests/search/search_export_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

from django.contrib.auth.models import User
from django.test.client import RequestFactory
from django.urls import reverse
from django.urls import get_script_prefix, reverse, set_script_prefix

from arches.app.views.api import SearchExport
from tests.base_test import ArchesTestCase
Expand Down Expand Up @@ -227,6 +227,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 f6062d6

Please sign in to comment.