small changes to tests

Small updates to test (I see this more consistent to local / travis tests.) 
The tests for this should probably be expanded with what is being tested in werkzeug, where this function was extracted from