Compare commits
1 Commits
feature/is
...
2ed9720e18
| Author | SHA1 | Date | |
|---|---|---|---|
| 2ed9720e18 |
@@ -84,9 +84,7 @@ def purchasePlaces():
|
||||
competitions=competitions, now=now)
|
||||
|
||||
# TODO: Add route for points display
|
||||
@app.route('/points')
|
||||
def displayPoints():
|
||||
return render_template('points.html', clubs=clubs)
|
||||
|
||||
|
||||
@app.route('/logout')
|
||||
def logout():
|
||||
|
||||
@@ -22,6 +22,5 @@
|
||||
<input type="email" name="email" id=""/>
|
||||
<button type="submit">Enter</button>
|
||||
</form>
|
||||
<a href="{{ url_for('displayPoints') }}">Board of points</a>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -1,19 +0,0 @@
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Board of clubs and points || GUDLFT</title>
|
||||
</head>
|
||||
<body>
|
||||
<h2>Current points</h2>
|
||||
<ul>
|
||||
{% for club in clubs %}
|
||||
<li><strong>club : </strong> {{club['name']}} </br>
|
||||
<strong>Points : </strong>{{club['points']}}</br>
|
||||
</br>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
<a href="{{ url_for('index') }}"> Back </a>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,24 +0,0 @@
|
||||
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