Skip to content

Commit

Permalink
fix advanced search test, upgrade (#1617)
Browse files Browse the repository at this point in the history
  • Loading branch information
mikkonie committed May 15, 2023
1 parent 8cb205d commit 96a579e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion requirements/base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
11 changes: 5 additions & 6 deletions samplesheets/tests/test_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'][
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 96a579e

Please sign in to comment.