diff --git a/blockchain_integration/pi_network/daictd/tests/test_network.py b/blockchain_integration/pi_network/daictd/tests/test_network.py new file mode 100644 index 000000000..ab7ed1550 --- /dev/null +++ b/blockchain_integration/pi_network/daictd/tests/test_network.py @@ -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()