Example #1
0
 def test_chunkify_peerstrings(self):
     # Addresses are of length 6
     address_string = "012345"
     address_strings = address_string * 10
     # _chunkify returns a generator
     split_address_strings = _chunkify(address_strings, 6)
     self.assertEquals(10, len(list(split_address_strings)))
Example #2
0
 def test_chunkify_peerstrings(self):
     # Addresses are of length 6
     address_string = "012345"
     address_strings = address_string * 10
     # _chunkify returns a generator
     split_address_strings = _chunkify(address_strings, 6)
     self.assertEquals(10, len(list(split_address_strings)))
Example #3
0
 def test_chunkify_nodestrings(self):
     # Node strings are of length 26
     node_string = "01" * 13
     node_strings = node_string * 10
     # _chunkify returns a generator
     split_node_strings = _chunkify(node_strings, 26)
     self.assertEquals(10, len(list(split_node_strings)))
Example #4
0
 def test_chunkify_nodestrings(self):
     # Node strings are of length 26
     node_string = "01" * 13
     node_strings = node_string * 10
     # _chunkify returns a generator
     split_node_strings = _chunkify(node_strings, 26)
     self.assertEquals(10, len(list(split_node_strings)))