-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathusers.py
More file actions
30 lines (24 loc) · 826 Bytes
/
users.py
File metadata and controls
30 lines (24 loc) · 826 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
"""
Methods related to managing user data. Primarily for testing the templating methods.
"""
class User:
"""
Class for managing user data when passing between the different parts of the application.
"""
def __init__(self, id, name, app_quota, apps_overdue, due_date, email):
self.id = id
self.name = name
self.app_quota = app_quota
self.apps_overdue = apps_overdue
self.due_date = due_date
self.email = email
def make_fake_users():
"""
Function to make some fake users for testing the users in the user review template.
:return: users - a list of user objects
"""
names = ['bob', 'alice', 'joe', 'thomas', 'james']
users = []
for i in range(5):
users.append(User(i, names[i], i, i, i, "test@test.com"))
return users