Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added a bunch of trustee related things
- Loading branch information
Showing
6 changed files
with
28 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
""" | ||
Testing Helios Features | ||
""" | ||
|
||
from helios.models import * | ||
from auth.models import * | ||
import uuid | ||
|
||
def generate_voters(election, num_voters = 1000, start_with = 1): | ||
# generate the user | ||
for v_num in range(start_with, start_with + num_voters): | ||
user = User(user_type='password', user_id='testuser%s' % v_num, name='Test User %s' % v_num) | ||
user.put() | ||
voter = Voter(uuid=str(uuid.uuid1()), election = election, voter_type=user.user_type, voter_id = user.user_id) | ||
voter.put() | ||
|
||
def delete_voters(election): | ||
for v in Voter.get_by_election(election): | ||
v.delete() |