mirror of
https://github.com/aljazceru/CTFd.git
synced 2025-12-17 22:14:25 +01:00
Fixing scoring logic (#320)
* fix inconsistent scoring: take awards into account in user.place() (#319) * Adding tests
This commit is contained in:
@@ -56,6 +56,12 @@ def login_as_user(app, name="user", password="password"):
|
||||
return client
|
||||
|
||||
|
||||
def get_scores(user):
|
||||
scores = user.get('/scores')
|
||||
scores = json.loads(scores.get_data(as_text=True))
|
||||
return scores['standings']
|
||||
|
||||
|
||||
def gen_challenge(db, name='chal_name', description='chal_description', value=100, category='chal_category', type=0):
|
||||
chal = Challenges(name, description, value, category)
|
||||
db.session.add(chal)
|
||||
|
||||
Reference in New Issue
Block a user