Skip to content

Commit a386bbf

Browse files
committed
(test) function purchasePlaces correctly updates club's points
1 parent 1c5db83 commit a386bbf

File tree

5 files changed

+9
-4
lines changed

5 files changed

+9
-4
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ bin
22
include
33
lib
44
.Python
5-
tests/
65
.envrc
76
__pycache__
87
.DS_Store

pytest.ini

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[pytest]
2+
3+
testpaths = tests

requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@ itsdangerous==1.1.0
44
Jinja2==2.11.2
55
MarkupSafe==1.1.1
66
Werkzeug==1.0.1
7+
pytest

server.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22
from flask import Flask,render_template,request,redirect,flash,url_for
33

44

5+
app = Flask(__name__)
6+
app.secret_key = 'something_special'
7+
app.config['CLUBS_FILE'] = 'clubs.json'
8+
59
def loadClubs():
610
with open(app.config['CLUBS_FILE']) as c:
711
listOfClubs = json.load(c)['clubs']
@@ -15,12 +19,10 @@ def loadCompetitions():
1519
return listOfCompetitions
1620

1721

18-
app = Flask(__name__)
19-
app.secret_key = 'something_special'
20-
2122
competitions = loadCompetitions()
2223
clubs = loadClubs()
2324

25+
2426
@app.route('/')
2527
def index():
2628
return render_template('index.html')

tests/__init__.py

Whitespace-only changes.

0 commit comments

Comments
 (0)