33
44import canopen
55import canopen .network
6-
7- from .util import SAMPLE_EDS
6+ import canopen .objectdictionary
87
98
109def count_subscribers (network : canopen .Network ) -> int :
@@ -23,17 +22,16 @@ def setUpClass(cls):
2322 cls .network .NOTIFIER_SHUTDOWN_TIMEOUT = 0.0
2423 cls .network .connect (interface = "virtual" )
2524
26- cls .node = canopen .LocalNode (2 , SAMPLE_EDS )
25+ cls .node = canopen .LocalNode (2 , canopen . objectdictionary . ObjectDictionary () )
2726
2827 @classmethod
2928 def tearDownClass (cls ):
3029 cls .network .disconnect ()
3130
3231 def test_associate_network (self ):
3332
34- # Need to store the number of subscribers before associating because
35- # the current network implementation automatically adds subscribers
36- # to the list
33+ # Need to store the number of subscribers before associating because the
34+ # network implementation automatically adds subscribers to the list
3735 n_subscribers = count_subscribers (self .network )
3836
3937 # Associating the network with the local node
@@ -75,17 +73,16 @@ def setUpClass(cls):
7573 cls .network .NOTIFIER_SHUTDOWN_TIMEOUT = 0.0
7674 cls .network .connect (interface = "virtual" )
7775
78- cls .node = canopen .RemoteNode (2 , SAMPLE_EDS )
76+ cls .node = canopen .RemoteNode (2 , canopen . objectdictionary . ObjectDictionary () )
7977
8078 @classmethod
8179 def tearDownClass (cls ):
8280 cls .network .disconnect ()
8381
8482 def test_associate_network (self ):
8583
86- # Need to store the number of subscribers before associating because
87- # the current network implementation automatically adds subscribers
88- # to the list
84+ # Need to store the number of subscribers before associating because the
85+ # network implementation automatically adds subscribers to the list
8986 n_subscribers = count_subscribers (self .network )
9087
9188 # Associating the network with the local node
0 commit comments