Skip to content
Snippets Groups Projects
Select Git revision
  • master protected
  • test default protected
  • original
  • pirati-backup protected
  • beta-2
  • beta-1
  • v3.1.4
  • v3.1.3
  • v3.1.2
  • v3.1.1
  • v3.1.0
  • v3.0.16
  • v3.0.15
  • v3.0.14
  • v3.0.13
  • v3.0.12
  • v3.0.11
  • v3.0.10
  • v3.0.9
  • v3.0.8
  • v3.0.7
  • v3.0.6
  • v3.0.5
  • v3.0.4
24 results

test.py

Blame
  • test.py 585 B
    """
    Testing Helios Features
    """
    
    from helios.models import *
    from helios_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()