diff options
author | Oleksii Chuprykov <ochuprykov@mirantis.com> | 2014-12-09 13:50:33 +0200 |
---|---|---|
committer | Oleksii Chuprykov <ochuprykov@mirantis.com> | 2014-12-09 13:52:54 +0200 |
commit | 9658b28959560df480a39084da5fb4029eef9e2d (patch) | |
tree | 4fdc4bb54a3fae4a242efc8ae62653d10d5d2155 | |
parent | 29e229a0539b730f30e2962930cb73008224451c (diff) | |
download | oslo-db-9658b28959560df480a39084da5fb4029eef9e2d.tar.gz |
Fix test_migrate_cli for py3
Use __lt__ insted of __cmp__ for py3 compatability.
Change-Id: I85d8eeb2cbb754b72b04c817f49d3a62f1473994
-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.' |