Skip to content

Commit

Permalink
hardcoded user
Browse files Browse the repository at this point in the history
  • Loading branch information
brianlzhou committed May 27, 2023
1 parent b8f3bfc commit bf83a2b
Showing 1 changed file with 17 additions and 24 deletions.
41 changes: 17 additions & 24 deletions scripts/email_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,30 +69,23 @@ def get_lat(self):
def get_long(self):
return self.long

# Insert your spreadsheet name here
filename = 'INSERT'

with open(filename, 'r') as csvfile:
csvreader = csv.reader(csvfile)

for row in csvreader:
from dateutil import parser
new_voter = User(
application_id=row[0],
name=row[1],
submission_time=parser.parse(row[3]),
county=row[2],
email=row[4],
phonenumber=row[5],
full_address=row[6],
ip=row[7],
group_code=row[8],
lat=row[9],
long=row[10]
)

session.add(new_voter)
session.commit()
# Create a hardcoded User instance
new_user = User(
application_id='123',
name='TESTING USER',
submission_time=datetime.utcnow(),
county='TESTING COUNTY',
email='testing@testing.com',
phonenumber='1111111111',
full_address='TESTING ADDRESS',
ip='127.0.0.1',
group_code='testing',
lat='12.345',
long='67.890'
)

session.add(new_user)
session.commit()



Expand Down

0 comments on commit bf83a2b

Please sign in to comment.