Git Product home page Git Product logo

Comments (1)

ib-lundgren avatar ib-lundgren commented on May 14, 2024

Hey @marienz and thank you for the bug report!

The tests do need quite a bit of work and it's there the fix should go rather than sorting the parsed auth header. One way they could be fixed is by using the assertItemsEqual method of unittest.TestCase rather than the naive comparison done currently.

For example, in test_collect_parameters replace

parameters = collect_parameters(uri_query=self.uri_query)
self.assertEquals(len(parameters), 6)
self.assertEquals(parameters[0], ('b5', '=%3D'))
self.assertEquals(parameters[1], ('a3', 'a'))
self.assertEquals(parameters[2], ('c@', ''))
self.assertEquals(parameters[3], ('a2', 'r b'))
self.assertEquals(parameters[4], ('c2', ''))
self.assertEquals(parameters[5], ('a3', '2 q'))

with

parameters = collect_parameters(uri_query=self.uri_query)
correct_parameters = [('b5', '=%3D'), ('a3', 'a'), ('c@', ''),  ('a2', 'r b'), ('c2', ''), ('a3', '2 q')]
self.assertItemsEqual(parameters, correct_parameters)

If you feel like making these changes where appropriate it would be great! If not thanks for the heads up and I'll sort it out soonish.

from oauthlib.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.