def METHOD_NAME(self, sleep, hec_session):
    response = Mock()
    response.ok = False
    response.status_code = 400
    response.raise_for_status.side_effect = Exception("BOOM!")
    hec_session.post.return_value = response
    events = [self.build_login_event(), self.build_login_event()]
    with self.assertRaises(Exception) as cm:
        self.store.bulk_store(events)
    self.assertEqual(cm.exception.args[0], "BOOM!")
    self.assertEqual(len(hec_session.post.call_args_list), 1)
    self.assertEqual(len(sleep.call_args_list), 0)