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

[Flaky test] openedx/features/enterprise_support/tests/test_utils.py::TestEnterpriseUtils::test_enterprise_customer_for_request_called_on_404_2____dashboard___1_ #36014

Open
timmc-edx opened this issue Dec 11, 2024 · 0 comments
Labels
flaky-test Details a test removed as part of the flaky test process

Comments

@timmc-edx
Copy link
Contributor

timmc-edx commented Dec 11, 2024

This test fails intermittently and has been deleted according to the Flaky Test Process in #24262

See docs on how to address flaky tests for why this should be fixed and how to go about it.

The removed test fails in: https://build.testeng.edx.org/job/edx-platform-python-pipeline-master/3656/ and https://build.testeng.edx.org/job/edx-platform-python-pipeline-master/3660/

Failure output:

Error Message
AssertionError: 0 != 1
Stacktrace
self = <openedx.features.enterprise_support.tests.test_utils.TestEnterpriseUtils testMethod=test_enterprise_customer_for_request_called_on_404_2____dashboard___1_>
resource = '/dashboard', expected_calls = 1

    @ddt.data(
        ('notfoundpage', 0),
        (reverse('dashboard'), 1),
    )
    @ddt.unpack
    def test_enterprise_customer_for_request_called_on_404(self, resource, expected_calls):
        """
        Test enterprise customer API is not called from 404 page
        """
        self.client.login(username=self.user.username, password='password')
    
        with mock.patch(
            'openedx.features.enterprise_support.api.enterprise_customer_for_request'
        ) as mock_customer_request:
            self.client.get(resource)
>           self.assertEqual(mock_customer_request.call_count, expected_calls)
E           AssertionError: 0 != 1

openedx/features/enterprise_support/tests/test_utils.py:46: AssertionError

Migrated from private ticket https://2u-internal.atlassian.net/issues/CR-2337

@timmc-edx timmc-edx added the flaky-test Details a test removed as part of the flaky test process label Dec 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flaky-test Details a test removed as part of the flaky test process
Projects
None yet
Development

No branches or pull requests

1 participant