rlittlefield / pypaseto

PASETO for Python
Other
98 stars 11 forks source link

Update unit tests to match ref spec Version2VectorTest #7

Closed rlittlefield closed 3 years ago

rlittlefield commented 6 years ago

Update unit tests to match ref spec Version2VectorTest.

They were recently updated in the php reference implementation to include corrected exp dated (with trailing '+00:00'. We should update our tests to match to avoid any divergence.

mjpieters commented 6 years ago

The tests are a bit more behind than just updating the expiration date. I believe that this is the range of changes that also need to be applied to include the expiration date changes.

Since that change, there have been further updates to the test suite that probably should be taken into account.

mjpieters commented 6 years ago

I can only make those tests pass when using a stable, compact JSON encoding; so no spaces and keys sorted. The upstream test just JSON-encodes the string locally, perhaps the Python test should hard-code the JSON strings?