def test_check_status_server_error(self, cassandra_connect_mock):
        repo = cassandra_repo.MetricsRepository()
        cassandra_connect_mock.side_effect = \
            cassandra.DriverException("Cluster is already shut down")

        result = repo.check_status()

        self.assertEqual(result, (False, 'Cluster is already shut down'))
Beispiel #2
0
 def execute(self, *args, **kwargs):
     self.calls += 1
     raise cassandra.DriverException()