Beispiel #1
0
 def internal_protocol(self):
     if self.options.internal_format == 'json':
         return StandardJSONProtocol()
     elif self.options.internal_format == 'pickle':
         return PickleProtocol()
     elif self.options.internal_format == 'raw':
         return RawProtocol()
Beispiel #2
0
 def test_bad_data(self):
     self.assertCantDecode(PickleProtocol(), b'{@#$@#!^&*$%^')
Beispiel #3
0
 def test_round_trip_with_trailing_tab(self):
     for k, v in PICKLE_KEYS_AND_VALUES:
         self.assertRoundTripWithTrailingTabOK(PickleProtocol(), k, v)
Beispiel #4
0
 def test_round_trip(self):
     for k, v in PICKLE_KEYS_AND_VALUES:
         self.assertRoundTripOK(PickleProtocol(), k, v)