djacobs / PyAPNs

Python library for interacting with the Apple Push Notification service (APNs)
http://pypi.python.org/pypi/apns/
MIT License
1.22k stars 374 forks source link

Fix non-determinism in tests.py #171

Open sharmaeklavya2 opened 8 years ago

sharmaeklavya2 commented 8 years ago

TestAPNs.testFrame can fail if the order of key-value pairs in frame.get_frame() is different from that in f1 or f2. Fix that by handling all possible orderings.

I don't know why this problem didn't come up till now. But I got hit by it when I tried to run tests on Python 3.4. Here's the failure - https://travis-ci.org/sharmaeklavya2/PyAPNs/jobs/143044041.