Exemple #1
0
 def test_4_community(self):
     communities = Communities()
     community = to_Community('1:1')
     communities.add(community)
     self.assertEqual(
         communities.pack(), ''.join(
             [chr(c) for c in [0xc0, 0x08, 0x04, 0x00, 0x01, 0x00, 0x01]]))
Exemple #2
0
 def test_3_community(self):
     self.assertEqual(to_Community('1:1'), 65537)
Exemple #3
0
 def test_2_community(self):
     self.assertEqual(to_Community('0x100'), 256)
Exemple #4
0
	def test_4_community (self):
		communities = Communities()
		community = to_Community('1:1')
		communities.add(community)
		self.assertEqual(communities.pack(),''.join([chr(c) for c in [0xc0,0x08,0x04,0x00,0x01,0x00,0x01]]))
Exemple #5
0
	def test_3_community (self):
		self.assertEqual(to_Community('1:1'),65537)
Exemple #6
0
	def test_2_community (self):
		self.assertEqual(to_Community('0x100'),256)