Ihar Hrachyshka 85dcf71f22 Introduce fixture to enforce sorted order for object changes
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
2016-04-15 08:50:12 +02:00
2015-02-02 15:08:43 -05:00
2015-02-02 15:08:43 -05:00
2015-02-02 15:08:43 -05:00
2015-02-02 15:08:43 -05:00
2015-02-02 15:08:43 -05:00
2015-02-02 15:08:43 -05:00
2016-04-08 00:32:25 +00:00
2015-09-17 12:16:17 +00:00
2015-12-09 17:59:31 +08:00

oslo.versionedobjects

Latest Version

Downloads

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.

Description
OpenStack versioned objects library
Readme 7 MiB
Languages
Python 100%