This repository was archived by the owner on Sep 19, 2018. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +14
-1
lines changed
Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change 4545 {% if country.country_code %}
4646 < a class ="btn btn-primary btn-lg "
4747 href ="{% url 'web.search_events' %}?country_code={{ country.country_code }}&past={{ past }} ">
48- < i class ="fa fa-list "> </ i > List all events < span id ="country "> {{ country.country_name }}</ span >
48+ < i class ="fa fa-list "> </ i > List all events in < span id ="country "> {{ country.country_name }}</ span >
4949 </ a >
5050 {% else %}
5151 < a class ="btn btn-primary btn-lg " href ="{% url 'web.search_events' %} ">
Original file line number Diff line number Diff line change @@ -235,6 +235,19 @@ def test_nonexistent_event(db, client):
235235
236236 assert response .status_code == 404
237237
238+ @pytest .mark .django_db
239+ def test_geoip_slovenian_ip (db , client ):
240+ response = client .get ('/' , REMOTE_ADDR = '93.103.53.1' )
241+
242+ assert 'List all events in <span id="country"> Slovenia' in response .content
243+
244+ @pytest .mark .django_db
245+ def test_geoip_invalid_ip (db , client ):
246+ response = client .get ('/' , REMOTE_ADDR = '127.0.0.1' )
247+
248+ assert 'List all events' in response .content
249+ assert 'List all events <span' not in response .content
250+
238251@pytest .mark .django_db
239252def test_list_events_for_country_code (db , client ):
240253 response = client .get (reverse ('web.view_event_by_country' , args = ['SI' ]))
You can’t perform that action at this time.
0 commit comments