예제 #1
0
    def verify_to_dict_end_to_end(self, client: ClientDescriptor) -> None:
        client_dict = client.to_dict()
        new_client = ClientDescriptor.from_dict(client_dict)
        self.assertEqual(client.to_dict(), new_client.to_dict())

        client_dict = client.to_dict()
        del client_dict["event_queue"]["newest_pruned_id"]
        new_client = ClientDescriptor.from_dict(client_dict)
        self.assertEqual(client_dict, new_client.to_dict())
예제 #2
0
 def verify_to_dict_end_to_end(self, client: ClientDescriptor) -> None:
     client_dict = client.to_dict()
     new_client = ClientDescriptor.from_dict(client_dict)
     self.assertEqual(client.to_dict(), new_client.to_dict())