-
-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
23 additions
and
0 deletions.
There are no files selected for viewing
23 changes: 23 additions & 0 deletions
23
blockchain_integration/pi_network/PiFusion/tests/test_dashboard.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import unittest | ||
from pi_fusion_dashboard.dashboard import Dashboard | ||
|
||
class TestDashboard(unittest.TestCase): | ||
def setUp(self): | ||
self.dashboard = Dashboard() | ||
|
||
def test_get_node_rankings(self): | ||
node_rankings = self.dashboard.get_node_rankings() | ||
self.assertIsInstance(node_rankings, list) | ||
self.assertGreater(len(node_rankings), 0) | ||
|
||
def test_get_transaction_activity(self): | ||
transaction_activity = self.dashboard.get_transaction_activity() | ||
self.assertIsInstance(transaction_activity, list) | ||
self.assertGreater(len(transaction_activity), 0) | ||
|
||
def test_update_dashboard(self): | ||
self.dashboard.update_dashboard() | ||
self.assertTrue(True) # TO DO: implement more robust test | ||
|
||
if __name__ == '__main__': | ||
unittest.main() |