Skip to content
This repository has been archived by the owner on Sep 26, 2019. It is now read-only.

Commit

Permalink
Merge "Fix failing cassandra driver unit tests"
Browse files Browse the repository at this point in the history
  • Loading branch information
Jenkins authored and openstack-gerrit committed May 3, 2016
2 parents f2cf003 + 3ea7bc4 commit b437289
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/unit/storage/cassandra/test_driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,10 +233,10 @@ def test_is_alive(self):
self.assertTrue(self.cassandra_driver.database is None)
self.assertFalse(self.cassandra_driver.is_alive())

@mock.patch.object(cassandra.cluster.Cluster, 'connect')
@mock.patch('cassandra.cluster.Cluster')
def test_connection(self, mock_cluster):
self.cassandra_driver.connection()
mock_cluster.assert_called_with()
mock_cluster.return_value.connect.assert_called_with()

def test_connect(self):
self.cassandra_driver.session = None
Expand Down Expand Up @@ -267,7 +267,7 @@ def test_flavor_controller(self):
isinstance(sc, flavors.FlavorsController),
True)

@mock.patch.object(cassandra.cluster.Cluster, 'connect')
@mock.patch('cassandra.cluster.Cluster')
def test_database(self, mock_cluster):
self.cassandra_driver.database
mock_cluster.assert_called_with()
mock_cluster.return_value.connect.assert_called_with()

0 comments on commit b437289

Please sign in to comment.