feature/issue7 #7
@@ -11,6 +11,7 @@
|
|||||||
<li><strong>club : </strong> {{club['name']}} </br>
|
<li><strong>club : </strong> {{club['name']}} </br>
|
||||||
<strong>Points : </strong>{{club['points']}}</br>
|
<strong>Points : </strong>{{club['points']}}</br>
|
||||||
</br>
|
</br>
|
||||||
|
</li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
<a href="{{ url_for('index') }}"> Back </a>
|
<a href="{{ url_for('index') }}"> Back </a>
|
||||||
|
|||||||
24
tests/test_board.py
Normal file
24
tests/test_board.py
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
from bs4 import BeautifulSoup
|
||||||
|
from server import loadClubs
|
||||||
|
|
||||||
|
|
||||||
|
class TestBoardDisplayPoints:
|
||||||
|
|
||||||
|
def test_should_get_200(self, client):
|
||||||
|
'''
|
||||||
|
test if the page is retrieved
|
||||||
|
'''
|
||||||
|
response = client.get('/points')
|
||||||
|
assert response.status_code == 200
|
||||||
|
|
||||||
|
def test_should_display_right_size_list(self, client):
|
||||||
|
'''
|
||||||
|
test if the list of club displayed and in DB have the same size
|
||||||
|
'''
|
||||||
|
list_club = loadClubs()
|
||||||
|
response = client.get('/points')
|
||||||
|
soup = BeautifulSoup(response.data, "html.parser")
|
||||||
|
li = soup.find_all("li")
|
||||||
|
assert len(li) == len(list_club)
|
||||||
|
|
||||||
|
|
||||||
Reference in New Issue
Block a user