From 96a579e58dc653222a8ef96d74f58822dac0d736 Mon Sep 17 00:00:00 2001 From: Mikko Nieminen Date: Thu, 27 Apr 2023 16:56:15 +0200 Subject: [PATCH] fix advanced search test, upgrade (#1617) --- requirements/base.txt | 2 +- samplesheets/tests/test_views.py | 11 +++++------ 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/requirements/base.txt b/requirements/base.txt index a77f3aac..1ccfe162 100644 --- a/requirements/base.txt +++ b/requirements/base.txt @@ -78,7 +78,7 @@ django-autocomplete-light==3.9.4 # SODAR Core # django-sodar-core==0.12.0 --e git+https://github.com/bihealth/sodar-core.git@09881c342243e14abcc7c84ee3758d20cf8a41cf#egg=django-sodar-core +-e git+https://github.com/bihealth/sodar-core.git@5fd06a3eed93389602a19ca0c2e29d65b4c74c5b#egg=django-sodar-core # Celery celery==5.2.7 diff --git a/samplesheets/tests/test_views.py b/samplesheets/tests/test_views.py index 7be500d0..ee89a627 100644 --- a/samplesheets/tests/test_views.py +++ b/samplesheets/tests/test_views.py @@ -1329,8 +1329,8 @@ def test_delete(self): self.assertEqual(ISATab.objects.count(), 0) -class TestProjectSearchView(TestViewsBase): - """Tests for the search results view with sample sheet input""" +class TestProjectSearchResultsView(TestViewsBase): + """Tests for ProjectSearchResultsView view with sample sheet input""" def _get_items(self, response): return response.context['app_results'][0]['results']['materials'][ @@ -1427,11 +1427,10 @@ def test_search_sample_type_source(self): def test_search_multi(self): """Test simple search with multiple terms""" + post_data = {'m': self.source.name + '\r\n' + self.sample.name} with self.login(self.user): - response = self.client.get( - reverse('projectroles:search') - + '?' - + urlencode({'m': self.source.name + '\r\n' + self.sample.name}) + response = self.client.post( + reverse('projectroles:search'), data=post_data ) self.assertEqual(response.status_code, 200) items = self._get_items(response)