Skip to content
This repository was archived by the owner on Sep 19, 2018. It is now read-only.

Commit ae06252

Browse files
author
Mateja
committed
Added test with non-ascii tags
1 parent ebf8c1a commit ae06252

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

web/tests/test_event_views.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# coding=utf-8
2+
13
import datetime
24
import pytest
35
import StringIO
@@ -60,6 +62,15 @@ def test_search_events_with_search_query(self):
6062
self.assertEquals(1,response.context['events'].count())
6163
self.assertEquals('SI', response.context['country'])
6264

65+
def test_search_events_with_unicode_tag_in_search_query(self):
66+
ApprovedEventFactory.create(tags=["jabolčna čežana","José", "Django"])
67+
response = self.client.get(reverse('web.search_events'), {'q':'čežana'}, REMOTE_ADDR='93.103.53.11')
68+
69+
self.assertEquals(1,response.context['events'].count())
70+
self.assertEquals('SI', response.context['country'])
71+
72+
73+
6374
def test_search_events_with_search_query_multiple_events(self):
6475
approved1 = ApprovedEventFactory.create(title="Event Arglebargle - Approved", country="SI")
6576
approved2 = ApprovedEventFactory.create(title="Event Arglebargle - Approved", country="AT")

0 commit comments

Comments
 (0)