database testing

This commit is contained in:
Neythen Treloar
2022-03-05 15:35:56 +00:00
parent c53038b8ed
commit b6646f60cb
4 changed files with 748 additions and 21 deletions

View File

@@ -29,7 +29,7 @@ import sys
#api_caller = pexpect.spawn("sudo -E taskset -c 3 python3 api_caller.py")
#api_caller = pexpect.spawn("sudo -E taskset -c 3 python3 database_caller.py")
api_caller = pexpect.spawn("sudo -E taskset -c 3 python3 database_caller2.py")
time.sleep(3)
@@ -574,14 +574,14 @@ def save_trade_settings(input_settings):
json.dump(current_settings, f)
f.close()
if input_settings['feature'].lower() == 'stocks':
#api_caller.sendline('s')
pass
api_caller.sendline('s')
elif input_settings['feature'].lower() == 'crypto':
#api_caller.sendline('c')
pass
api_caller.sendline('c')
elif input_settings['feature'].lower() == 'forex':
#api_caller.sendline('f')
pass
api_caller.sendline('f')
def save_weather_settings(input_settings):
@@ -613,7 +613,7 @@ def save_weather_settings(input_settings):
current_settings = combine_dict(current_settings, input_settings['locations'], 'locations')
json.dump(current_settings, open('csv/' + filename, 'w+'))
#api_caller.sendline('w')
api_caller.sendline('w')
def save_news_settings(input_settings):
filename = 'news_settings.json'
@@ -636,7 +636,7 @@ def save_news_settings(input_settings):
print(current_settings)
json.dump(current_settings, open('csv/' + filename, 'w+'))
#api_caller.sendline('n')
api_caller.sendline('n')
def save_sports_settings(input_settings):
@@ -662,7 +662,7 @@ def save_sports_settings(input_settings):
json.dump(current_settings, open('csv/' + filename, 'w+'))
#api_caller.sendline('S')
api_caller.sendline('S')
# for images and GIFs
def save_image_settings(input_settings):