access context through table object (#31092)

This commit is contained in:
Emmanuel Cazenave 2019-03-05 13:31:32 +01:00
parent c63b9f0a26
commit 2741961ead
2 changed files with 2 additions and 1 deletions

View File

@ -20,7 +20,7 @@
{% block table.tbody.row %}
<tr
{% if row_link %}
{% if table.context.row_link %}
{% if popup_edit %}
rel="popup"
{% endif %}

View File

@ -708,6 +708,7 @@ def test_manager_ou(app, superuser_or_admin, ou1):
ou2 = OU.objects.get(name='ou2')
assert set([e.text for e in ou_homepage.pyquery('td.name')]) == set(['OU1', 'Default organizational unit', 'ou2'])
assert len(ou_homepage.pyquery('tr[data-pk="%s"] td.default span.true' % ou2.pk)) == 1
assert len(ou_homepage.pyquery('tr[data-url="%s/"] td.default span.true' % ou2.pk)) == 1
# FIXME: table lines are not clickable as they do not contain an anchor
# default ou cannot be deleted