Skip to content

Commit

Permalink
fix tests, pickle doesn't support sort_keys
Browse files Browse the repository at this point in the history
  • Loading branch information
davidism committed Apr 12, 2016
1 parent a1f192f commit f1ecd77
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,11 @@ def test_signer_kwargs(self):
self.assertEqual(s.loads(ts), u'hello')

def test_serializer_kwargs(self):
secret_key = 'predictable-key'
s = self.make_serializer('predictable-key', serializer_kwargs={'sort_keys': True})

s = self.make_serializer(secret_key, serializer_kwargs={'sort_keys': True})
# pickle tests pop serializer kwargs, so skip this test for those
if not s.serializer_kwargs:
return

ts1 = s.dumps({'c': 3, 'a': 1, 'b': 2})
ts2 = s.dumps(dict(a=1, b=2, c=3))
Expand Down

0 comments on commit f1ecd77

Please sign in to comment.