예제 #1
0
 def test_signing_comment_works(self, mock_format_dt):
     entity = DiasporaComment(
         raw_content="raw_content", guid="guid", target_guid="target_guid", handle="handle",
         created_at="created_at",
     )
     entity.sign(get_dummy_private_key())
     assert entity.signature == "OWvW/Yxw4uCnx0WDn0n5/B4uhyZ8Pr6h3FZaw8J7PCXyPluOfYXFoHO21bykP8c2aVnuJNHe+lmeAkUC" \
                                "/kHnl4yxk/jqe3uroW842OWvsyDRQ11vHxhIqNMjiepFPkZmXX3vqrYYh5FrC/tUsZrEc8hHoOIHXFR2" \
                                "kGD0gPV+4EEG6pbMNNZ+SBVun0hvruX8iKQVnBdc/+zUI9+T/MZmLyqTq/CvuPxDyHzQPSHi68N9rJyr" \
                                "4Xa1K+R33Xq8eHHxs8LVNRqzaHGeD3DX8yBu/vP9TYmZsiWlymbuGwLCa4Yfv/VS1hQZovhg6YTxV4CR" \
                                "v4ToGL+CAJ7UHEugRRBwDw=="
예제 #2
0
 def test_signing_comment_works(self, mock_format_dt):
     entity = DiasporaComment(
         raw_content="raw_content",
         created_at="created_at",
         actor_id="handle",
         handle="handle",
         id="guid",
         guid="guid",
         target_id="target_guid",
         target_guid="target_guid",
         root_target_id="target_guid",
         root_target_guid="target_guid",
     )
     entity.sign(get_dummy_private_key())
     assert entity.signature == "XZYggFdQHOicguZ0ReVJkYiK5othHgBgAtwnSmm4NR31qeLa76Ur/i2B5Xi9dtopDlNS8EbFy+MLJ1ds" \
                                "ovDjPsVC1nLZrL57y0v+HtwJas6hQqNbvmEyr1q6X+0p1i93eINzt/7bxcP5uEGxy8J4ItsJzbDVLlC5" \
                                "3ZtIg7pmhR0ltqNqBHrgL8WDokfGKFlXqANchbD+Xeyv2COGbI78LwplVdYjHW1+jefjpYhMCxayIvMv" \
                                "WS8TV1hMTqUz+zSqoCHU04RgjjGW8e8vINDblQwMfEMeJ5T6OP5RiU3zCqDc3uL2zxHHh9IGC+clVuhP" \
                                "HTv8tHUHNLgc2vIzRtGh6w=="