85dcf71f22
![Ihar Hrachyshka](/assets/img/avatar_default.png)
In unit tests, sometimes you want to compare that JSON representation of an object is identical to a JSON blob. Sadly, it may not work for objects with changes made, since those changes are represented in the object as a set, and hence end up in unstable order in JSON blobs. To facilitate smooth object representation comparison for objects using __eq__, this fixture enforces sorting for object changes. Note: this code is directly ripped from Nova tree, with tiny modifications: https://git.openstack.org/cgit/openstack/nova/tree/nova/tests/fixtures.py?id=dd36b6474ee9d70636fd4bc5f30237de2151fc45#n571 https://git.openstack.org/cgit/openstack/nova/tree/nova/tests/unit/test_fixtures.py?id=dd36b6474ee9d70636fd4bc5f30237de2151fc45#n425 Co-Authored-By: Dan Smith <dansmith@redhat.com> Change-Id: Ib24eea4af863078d39f8969a7890b5d9d2e11405 Closes-Bug: #1552676
oslo.versionedobjects
The oslo.versionedobjects library provides a generic versioned object model that is RPC-friendly, with inbuilt serialization, field typing, and remotable method calls. It can be used to define a data model within a project independent of external APIs or database schema for the purposes of providing upgrade compatibility across distributed services.
- Free software: Apache license
- Documentation: http://docs.openstack.org/developer/oslo.versionedobjects
- Source: http://git.openstack.org/cgit/openstack/oslo.versionedobjects
- Bugs: http://bugs.launchpad.net/oslo.versionedobjects
Description
Languages
Python
100%