

def test_original_item_unaffected(self):
    '\n        Ensure the item (dict) passed into the function is not changed.\n        '
    item = {
        'foo': 'bar',
        'baz': [1, 2, 3],
    }
    get_signed_item(item, PUBLIC_KEY, PRIVATE_KEY)
    self.assertNotIn('_p4p2p', item)
    self.assertEqual(2, len(item))
    self.assertIn('foo', item)
    self.assertIn('baz', item)
    self.assertEqual(item['foo'], 'bar')
    self.assertEqual(item['baz'], [1, 2, 3])

dataset/ETHPy150Open ntoll/p4p2p/test/dht/test_crypto.py TestGetSignedItem.test_original_item_unaffected/original