Skip to content

Commit

Permalink
Create test_dashboard.py
Browse files Browse the repository at this point in the history
  • Loading branch information
KOSASIH authored Aug 10, 2024
1 parent fca76d6 commit 693fb73
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions blockchain_integration/pi_network/PiFusion/tests/test_dashboard.py
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()

0 comments on commit 693fb73

Please sign in to comment.