Created database class.

Tidied app.py so that it only contains controller logic.
Added error handling for if number of entrants exceeds number of possible identifiers
Updated test coverage to test for all identifiers, as well as error case
This commit is contained in:
2019-07-06 12:43:49 +01:00
parent 9c42cb7890
commit 4da511a7d5
7 changed files with 153 additions and 55 deletions

6
web/utils.py Normal file
View File

@@ -0,0 +1,6 @@
def remove_common_elements(a, b):
"""Removes the common elements from both supplied lists (in place), doesnt not return a new list"""
for e in a[:]:
if e in b:
a.remove(e)
b.remove(e)