diff --git a/tests/tests.py b/tests/tests.py index 650fd65..68efef0 100644 --- a/tests/tests.py +++ b/tests/tests.py @@ -88,8 +88,8 @@ def test_list(self): user_agent='Firefox') response = self.client.get(reverse('user_sessions:session_list')) self.assertContains(response, 'Active Sessions') - self.assertContains(response, 'End Session', 3) self.assertContains(response, 'Firefox') + self.assertNotContains(response, 'ABC123') def test_delete(self): session_key = self.client.cookies[settings.SESSION_COOKIE_NAME].value diff --git a/user_sessions/templates/user_sessions/session_list.html b/user_sessions/templates/user_sessions/session_list.html index e7ea361..0e872b4 100644 --- a/user_sessions/templates/user_sessions/session_list.html +++ b/user_sessions/templates/user_sessions/session_list.html @@ -13,7 +13,6 @@

{% trans "Active Sessions" %}

{% trans "Location" %} {% trans "Device" %} {% trans "Last Activity" %} - {% trans "End Session" %} {% for object in object_list %} @@ -27,16 +26,6 @@

{% trans "Active Sessions" %}

{% blocktrans with time=object.last_activity|timesince %}{{ time }} ago{% endblocktrans %} {% endif %} - -
- {% csrf_token %} - {% if object.session_key == session_key %} - - {% else %} - - {% endif %} -
- {% endfor %}