Exemplo n.º 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()
Exemplo n.º 2
0
 def test_bad_data(self):
     self.assertCantDecode(PickleProtocol(), b'{@#$@#!^&*$%^')
Exemplo n.º 3
0
 def test_round_trip_with_trailing_tab(self):
     for k, v in PICKLE_KEYS_AND_VALUES:
         self.assertRoundTripWithTrailingTabOK(PickleProtocol(), k, v)
Exemplo n.º 4
0
 def test_round_trip(self):
     for k, v in PICKLE_KEYS_AND_VALUES:
         self.assertRoundTripOK(PickleProtocol(), k, v)