Skip to content

Commit

Permalink
Create test_network.py
Browse files Browse the repository at this point in the history
  • Loading branch information
KOSASIH authored Aug 4, 2024
1 parent 317b045 commit 2dedcc8
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions blockchain_integration/pi_network/daictd/tests/test_network.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import unittest
from network import Network

class TestNetwork(unittest.TestCase):
def setUp(self):
self.network = Network()

def test_send_data(self):
# Test sending data over the network
data = [...]
self.network.send_data(data)
self.assertTrue(self.network.is_connected)

def test_receive_data(self):
# Test receiving data from the network
data = self.network.receive_data()
self.assertIsInstance(data, list)

if __name__ == '__main__':
unittest.main()

0 comments on commit 2dedcc8

Please sign in to comment.