Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/maps/templates/user_location_list.html
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ <h3>DELETE <code>/{{ camp.slug }}/map/userlocation/&lt;uuid&gt;/api/</code></h3>
</p>

{% if userlocation_list %}
<table class="table table-hover table-striped datatable">
<table id="main_table" class="table table-hover table-striped datatable">
<thead>
<tr>
<th>Name</th>
Expand Down
6 changes: 3 additions & 3 deletions src/maps/tests/test_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ def setUpTestData(cls) -> None:
description="Test Layer",
icon="fas fa-tractor",
group=cls.group,
responsible_team=cls.team,
responsible_team=cls.teams['noc'],
)
cls.layer.save()

Expand Down Expand Up @@ -209,7 +209,7 @@ def test_user_location_view(self) -> None:

content = response.content.decode()
soup = BeautifulSoup(content, "html.parser")
rows = soup.select("div#main > table > tbody > tr")
rows = soup.select("table#main_table > tbody > tr")
self.assertEqual(len(rows), 1, "user location list does not return 1 entries")

def test_user_location_create(self) -> None:
Expand All @@ -234,5 +234,5 @@ def test_user_location_create(self) -> None:

content = response.content.decode()
soup = BeautifulSoup(content, "html.parser")
rows = soup.select("div#main > table > tbody > tr")
rows = soup.select("table#main_table > tbody > tr")
self.assertEqual(len(rows), 2, "user location list does not return 2 entries after create")
2 changes: 1 addition & 1 deletion src/phonebook/templates/dectregistration_list.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<a href="{% url 'phonebook:list' camp_slug=camp.slug %}" class="btn btn-primary"><i class="fas fa-list"></i> Phonebook</a>
<a href="{% url 'phonebook:dectregistration_create' camp_slug=camp.slug %}" class="btn btn-success"><i class="fas fa-plus"></i> Create DECT Registration</a>
</p>
<table class="table table-hover table-striped">
<table id="main_table" class="table table-hover table-striped">
<thead>
<tr>
<th>Number</th>
Expand Down
2 changes: 1 addition & 1 deletion src/phonebook/templates/phonebook.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ <h2>{{ camp.title }} Phonebook</h2>
{% endif %}

{% if dectregistration_list %}
<table class="table table-hover table-striped datatable">
<table id="main_table" class="table table-hover table-striped datatable">
<thead>
<tr>
<th>Number</th>
Expand Down
14 changes: 7 additions & 7 deletions src/phonebook/tests/test_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,23 +53,23 @@ def test_phonebook_list_view(self) -> None:
response = self.client.get(url)
content = response.content.decode()
soup = BeautifulSoup(content, "html.parser")
rows = soup.select("div#main > table > tbody > tr")
rows = soup.select("table#main_table > tbody > tr")
self.assertEqual(len(rows), 2, "phonebook list does not return 2 entries")

def test_dect_registration_list_view(self) -> None:
"""Test the basics of the dect registrations list view."""
url = reverse("phonebook:dectregistration_list", kwargs={"camp_slug": self.camp.slug})
self.client.login(username="user0", password="user0")
self.client.force_login(self.users[0])

response = self.client.get(url)
content = response.content.decode()
soup = BeautifulSoup(content, "html.parser")
rows = soup.select("div#main > div > div > table > tbody > tr")
rows = soup.select("table#main_table > tbody > tr")
self.assertEqual(len(rows), 3, "dect registration list does not return 2 registrations")

def test_dect_registration_create_view(self) -> None:
"""Test the basics of the dect registrations create view."""
self.client.login(username="user0", password="user0")
self.client.force_login(self.users[0])

url = reverse("phonebook:dectregistration_create", kwargs={"camp_slug": self.camp.slug})

Expand All @@ -90,7 +90,7 @@ def test_dect_registration_create_view(self) -> None:
# Test if the registration shows up
content = response.content.decode()
soup = BeautifulSoup(content, "html.parser")
rows = soup.select("div#main > div > div > table > tbody > tr")
rows = soup.select("table#main_table > tbody > tr")
self.assertEqual(len(rows), 4, "dect registration create number failed")

# Test Named number
Expand All @@ -110,7 +110,7 @@ def test_dect_registration_create_view(self) -> None:
# Test if the registration shows up
content = response.content.decode()
soup = BeautifulSoup(content, "html.parser")
rows = soup.select("div#main > div > div > table > tbody > tr")
rows = soup.select("table#main_table > tbody > tr")
self.assertEqual(len(rows), 5, "dect registration create INFO failed")

# Test duplicated number
Expand Down Expand Up @@ -158,5 +158,5 @@ def test_dect_registration_create_view(self) -> None:
response = self.client.get(url)
content = response.content.decode()
soup = BeautifulSoup(content, "html.parser")
rows = soup.select("div#main > table > tbody > tr")
rows = soup.select("table#main_table > tbody > tr")
self.assertEqual(len(rows), 3, "phonebook list does not return 3 entries after create")
4 changes: 2 additions & 2 deletions src/tokens/tests/test_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def setUpTestData(cls) -> None:

def test_token_list_view(self) -> None:
"""Test the basics of the token list view."""
self.client.login(username="user0", password="user0")
self.client.force_login(self.users[0])
url = reverse("tokens:tokenfind_list")

response = self.client.get(url)
Expand All @@ -94,7 +94,7 @@ def test_token_list_view(self) -> None:

def test_token_find_view(self) -> None:
"""Test the basics of the token find view."""
self.client.login(username="user0", password="user0")
self.client.force_login(self.users[0])

url = reverse("tokens:details", kwargs={"token": self.token.token})

Expand Down
Empty file added src/utils/bootstrap/__init__.py
Empty file.
Loading
Loading