def METHOD_NAME(self, requests_mock, monkeypatch):
    sleep = MagicMock()
    monkeypatch.setattr(api, "sleep", sleep)
    mock = requests_mock.post(AMP_BATCH_URL, [{"status_code": 429}, {"status_code": 200}])
    with AmpEventUploader("myapikey", dry_run=False) as uploader:
        uploader.queue(AmpEvent(2, "myevent"))
    sleep.assert_called_once_with(api.AMP_RATE_LIMIT_WAIT_SECS)
    assert mock.call_count == 2
    assert mock.request_history[0].json() == mock.request_history[1].json()