diff --git a/dataserv/app.py b/dataserv/app.py index 8991c43..a7f905d 100644 --- a/dataserv/app.py +++ b/dataserv/app.py @@ -21,6 +21,7 @@ def secs_to_mins(seconds): else: return "{0} hour(s)".format(int(seconds/3600)) + def online_farmers(): # maximum number of minutes since the last check in for # the farmer to be considered an online farmer @@ -107,7 +108,7 @@ def total(): app.config["BYTE_SIZE"] = 1024*1024*128 result = total_shards * (app.config["BYTE_SIZE"] / (1024*1024*1024*1024)) # bytes / 1 TB - return "{0} TB".format(round(result,2)) + return "{0} TB".format(round(result, 2)) @app.route('/api/height//', methods=["GET"]) diff --git a/tests/test_App.py b/tests/test_App.py index 43eea4c..e7243c0 100644 --- a/tests/test_App.py +++ b/tests/test_App.py @@ -153,4 +153,4 @@ def test_farmer_total_bytes(self): # check total bytes rv = self.app.get('/api/total') - self.assertEqual(b"1.22 TB", rv.data) \ No newline at end of file + self.assertEqual(b"1.22 TB", rv.data) diff --git a/tests/test_Farmer.py b/tests/test_Farmer.py index 6687db3..014b457 100644 --- a/tests/test_Farmer.py +++ b/tests/test_Farmer.py @@ -99,4 +99,4 @@ def test_height(self): self.assertEqual(farmer.height, 5) farmer2 = farmer.lookup() - self.assertEqual(farmer2.height, 5) \ No newline at end of file + self.assertEqual(farmer2.height, 5)