Skip to content

Commit

Permalink
Updated IPv8 pointer
Browse files Browse the repository at this point in the history
  • Loading branch information
devos50 committed Aug 10, 2018
1 parent 877f832 commit 6bf9f11
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
16 changes: 8 additions & 8 deletions Tribler/Test/Community/popularity/test_payload.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def test_content_subscription(self):
subscribe = True
identifier = 123123
subscription = ContentSubscription(identifier, subscribe)
serialized = self.serializer.pack_multiple(subscription.to_pack_list())
serialized = self.serializer.pack_multiple(subscription.to_pack_list())[0]

# Deserialize and test it
(deserialized, _) = self.serializer.unpack_multiple(ContentSubscription.format_list, serialized)
Expand All @@ -41,7 +41,7 @@ def test_torrent_health_payload(self):
timestamp = 123123123

health_payload = TorrentHealthPayload(infohash, num_seeders, num_leechers, timestamp)
serialized = self.serializer.pack_multiple(health_payload.to_pack_list())
serialized = self.serializer.pack_multiple(health_payload.to_pack_list())[0]

# Deserialize and test it
(deserialized, _) = self.serializer.unpack_multiple(TorrentHealthPayload.format_list, serialized)
Expand All @@ -61,7 +61,7 @@ def test_channel_health_payload(self):
timestamp = 123123123

health_payload = ChannelHealthPayload(channel_id, num_votes, num_torrents, swarm_size_sum, timestamp)
serialized = self.serializer.pack_multiple(health_payload.to_pack_list())
serialized = self.serializer.pack_multiple(health_payload.to_pack_list())[0]

# Deserialize and test it
(deserialized, _) = self.serializer.unpack_multiple(ChannelHealthPayload.format_list, serialized)
Expand All @@ -83,7 +83,7 @@ def test_torrent_info_response_payload_for_default_values(self):
comment = None

health_payload = TorrentInfoResponsePayload(infohash, name, length, creation_date, num_files, comment)
serialized = self.serializer.pack_multiple(health_payload.to_pack_list())
serialized = self.serializer.pack_multiple(health_payload.to_pack_list())[0]

# Deserialize and test it
(deserialized, _) = self.serializer.unpack_multiple(TorrentInfoResponsePayload.format_list, serialized)
Expand Down Expand Up @@ -121,9 +121,9 @@ def test_search_result_payload_serialization(self):
# Serialize the results
results = ''
for item in sample_items:
results += self.serializer.pack_multiple(item.to_pack_list())
results += self.serializer.pack_multiple(item.to_pack_list())[0]
serialized_results = self.serializer.pack_multiple(
SearchResponsePayload(identifier, response_type, results).to_pack_list())
SearchResponsePayload(identifier, response_type, results).to_pack_list())[0]

# De-serialize the response payload and check the identifier and get the results
response_format = SearchResponsePayload.format_list
Expand Down Expand Up @@ -172,7 +172,7 @@ def test_content_info_request(self):

# Serialize request
in_request = ContentInfoRequest(identifier, content_type, query_list, limit)
serialized_request = self.serializer.pack_multiple(in_request.to_pack_list())
serialized_request = self.serializer.pack_multiple(in_request.to_pack_list())[0]

# Deserialize request and test it
(deserialized_request, _) = self.serializer.unpack_multiple(ContentInfoRequest.format_list, serialized_request)
Expand All @@ -192,7 +192,7 @@ def test_content_info_response(self):

# Serialize request
in_response = ContentInfoResponse(identifier, content_type, response, pagination)
serialized_response = self.serializer.pack_multiple(in_response.to_pack_list())
serialized_response = self.serializer.pack_multiple(in_response.to_pack_list())[0]

# Deserialize request and test it
(deserialized_response, _) = self.serializer.unpack_multiple(ContentInfoResponse.format_list,
Expand Down

0 comments on commit 6bf9f11

Please sign in to comment.