-
-
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
20 additions
and
0 deletions.
There are no files selected for viewing
20 changes: 20 additions & 0 deletions
20
blockchain_integration/pi_network/daictd/tests/test_network.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,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() |