Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Re-enable asnyc event API tests #32062

Merged
merged 2 commits into from
Jan 31, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions tests/integration_tests/async_events/api_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,17 @@
from typing import Any, Optional, Type
from unittest import mock

import pytest

from superset.async_events.cache_backend import (
RedisCacheBackend,
RedisSentinelCacheBackend,
)
from superset.extensions import async_query_manager
from superset.extensions import async_query_manager, async_query_manager_factory
from superset.utils import json
from tests.integration_tests.base_tests import SupersetTestCase
from tests.integration_tests.constants import ADMIN_USERNAME
from tests.integration_tests.test_app import app


@pytest.skip(reason="Needs to investigate this test", allow_module_level=True)
class TestAsyncEventApi(SupersetTestCase):
UUID = "943c920-32a5-412a-977d-b8e47d36f5a4"

Expand All @@ -41,7 +38,7 @@ def fetch_events(self, last_id: Optional[str] = None):

def run_test_with_cache_backend(self, cache_backend_cls: Type[Any], test_func):
app._got_first_request = False
async_query_manager.init_app(app)
async_query_manager_factory.init_app(app)

# Create a mock cache backend instance
mock_cache = mock.Mock(spec=cache_backend_cls)
Expand Down Expand Up @@ -130,7 +127,7 @@ def test_events_redis_sentinel_cache_backend(self, mock_uuid4):

def test_events_no_login(self):
app._got_first_request = False
async_query_manager.init_app(app)
async_query_manager_factory.init_app(app)
rv = self.fetch_events()
assert rv.status_code == 401

Expand Down
Loading