Skip to content

Commit 074b93e

Browse files
committed
uptime test
1 parent e91b831 commit 074b93e

File tree

3 files changed

+2
-2
lines changed

3 files changed

+2
-2
lines changed

driveshare_graph/storage.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ def init_stats_table(conn, cursor, collection):
8484

8585

8686
def update_stats_table(conn, cursor, collection):
87-
cursor.execute('SELECT MAX(time) from stats')
87+
cursor.execute('SELECT MAX(date) from stats')
8888
last_date = dt.datetime.fromtimestamp(int(cursor.fetchone()[0]))
8989
for doc in collection.find({'time': {'$gt': last_date}}):
9090
tb = doc['total_TB']

tests/init_test_network.db

-36 KB
Binary file not shown.

tests/test_uptime.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def test_init_farmers_table(self):
3030
conn.close()
3131

3232
def test_address_in_db(self):
33-
conn = sqlite3.connect('tests/init_test_network.db')
33+
conn = sqlite3.connect('tests/test_network.db')
3434
cursor = conn.cursor()
3535
test_address = '16cyAxo1WaR1A1zJbWEz6hiZaiNbhNqoSf'
3636
self.assertTrue(uptime.address_in_db(cursor, test_address))

0 commit comments

Comments
 (0)