Exemplo n.º 1
0
    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'))
Exemplo n.º 2
0
 def execute(self, *args, **kwargs):
     self.calls += 1
     raise cassandra.DriverException()