fix a silly bug
This commit is contained in:
@@ -11,5 +11,5 @@
|
||||
<a href="{% url 'anatomy:exam_cids' exam_id=exam.pk %}">Candidates</a> /
|
||||
<a href="{% url 'anatomy:exam_stats' exam_id=exam.pk %}">Stats</a> /
|
||||
{% endif %}
|
||||
<a href="{% url 'anatomy:create_exam' pk=exam.pk %}" title="Add a new question directly into the exam.">Add New Question</a>
|
||||
{% comment %} <a href="{% url 'anatomy:question_create_exam' pk=exam.pk %}" title="Add a new question directly into the exam.">Add New Question</a> {% endcomment %}
|
||||
{% endblock %}
|
||||
|
||||
@@ -315,6 +315,7 @@ class SupervisorTable(tables.Table):
|
||||
|
||||
sequence = ("name", "email")
|
||||
exclude = ("id",)
|
||||
attrs = {"id": "supervisor-table"}
|
||||
|
||||
def render_edit(self, value, record):
|
||||
url = f"{reverse("generic:supervisor_edit", args=[record.pk])}?redirect={self.request.path}"
|
||||
|
||||
@@ -306,7 +306,7 @@ def test_supervisor_management(db, faker, client, create_cid_manager, django_use
|
||||
assert response.status_code == 200
|
||||
|
||||
soup = BeautifulSoup(response.content, "html.parser")
|
||||
assert len(soup.find(id="tbody").find_all("tr")) == 2
|
||||
assert len(soup.find(id="supervisor-table").find("tbody").find_all("tr")) == 2
|
||||
|
||||
response = client.get(reverse(f"generic:supervisor_detail", kwargs={"pk": s1.pk}))
|
||||
soup = BeautifulSoup(response.content, "html.parser")
|
||||
@@ -331,7 +331,8 @@ def test_supervisor_management(db, faker, client, create_cid_manager, django_use
|
||||
assert response.status_code == 200
|
||||
|
||||
soup = BeautifulSoup(response.content, "html.parser")
|
||||
assert len(soup.find(id="supervisor-list").find_all("li")) == 1
|
||||
assert len(soup.find(id="supervisor-table").find("tbody").find_all("tr")) == 1
|
||||
#assert len(soup.find(id="supervisor-list").find_all("li")) == 1
|
||||
|
||||
response = client.post(reverse(f"generic:supervisor_create"), {"email":faker.email(), "name": faker.name()})
|
||||
assert response.status_code == 302
|
||||
@@ -340,7 +341,7 @@ def test_supervisor_management(db, faker, client, create_cid_manager, django_use
|
||||
assert response.status_code == 200
|
||||
|
||||
soup = BeautifulSoup(response.content, "html.parser")
|
||||
assert len(soup.find(id="supervisor-list").find_all("li")) == 2
|
||||
assert len(soup.find(id="supervisor-table").find("tbody").find_all("tr")) == 2
|
||||
|
||||
|
||||
def test_privacy(db, client):
|
||||
|
||||
Reference in New Issue
Block a user