Commit 63a2be80 authored by Danielvdh03's avatar Danielvdh03
Browse files

Commented out some debugging SQL print statements + 2 more test cases

parent 40b57383
......@@ -537,7 +537,7 @@ class Database:
"county_id = (select id from county where name=\"{0}\" and state_id = ( select id from state " \
"where name = \"{1}\"));".format(county, state)
print(query)
# print(query)
results = self.execute_query(query)
......@@ -559,7 +559,7 @@ class Database:
query += "set annotations = \"{0}\" where party = \"{1}\" and county_id = (select id from county where name=\"{2}\" and state_id = ( select id from state " \
"where name = \"{3}\"));".format(annotation, party, county, state)
print(query)
# print(query)
result = self.execute_query(query)
......@@ -626,14 +626,14 @@ class Database:
query = "insert into user (id, county_id, display_name, follower_count) \n"
query += "values({0},{1},\"{2}\",{3});".format(identifier, county_id, display, followers)
print(query)
# print(query)
self.execute_query(query)
def get_county_id(self, county:str, state:str):
query = "select id from county where name = \"{0}\" and state_id = (select id from state where name = \"{1}\");".format(county,state)
print(query)
# print(query)
results = self.execute_query(query)
for result in results:
......@@ -720,11 +720,11 @@ if __name__ == "__main__":
client.insert_tweet()
elif command == "add_annotation_county":
elif command == "add_annotation_county": # Works
client.add_annotation_county()
elif command == "view_annotation_county":
elif command == "view_annotation_county": # Works
client.view_annotation_county()
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment