diff options
author | Jenkins <jenkins@review.openstack.org> | 2014-12-09 16:29:26 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2014-12-09 16:29:27 +0000 |
commit | b60b3fe7bfc9f8a5846c4a51cb503c732ca1e29b (patch) | |
tree | cee4b601361ba24918be140c6cb9accc1ead5951 | |
parent | 34caedc34224058cc9a87309e2e8c48969af772f (diff) | |
parent | 9658b28959560df480a39084da5fb4029eef9e2d (diff) | |
download | oslo-db-b60b3fe7bfc9f8a5846c4a51cb503c732ca1e29b.tar.gz |
Merge "Fix test_migrate_cli for py3"
-rw-r--r-- | tests/sqlalchemy/test_migrate_cli.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/sqlalchemy/test_migrate_cli.py b/tests/sqlalchemy/test_migrate_cli.py index 32e9a9d..d7e7a5c 100644 --- a/tests/sqlalchemy/test_migrate_cli.py +++ b/tests/sqlalchemy/test_migrate_cli.py @@ -22,8 +22,10 @@ class MockWithCmp(mock.MagicMock): order = 0 - def __cmp__(self, other): - return self.order > other.order + def __init__(self, *args, **kwargs): + super(MockWithCmp, self).__init__(*args, **kwargs) + + self.__lt__ = lambda self, other: self.order < other.order @mock.patch(('oslo.db.sqlalchemy.migration_cli.' |