Kengo Seki created AIRFLOW-2207:

             Summary: Fix flaky test that uses app.cached_app()
                 Key: AIRFLOW-2207
             Project: Apache Airflow
          Issue Type: Bug
          Components: tests
            Reporter: Kengo Seki

tests.www.test_views:TestMountPoint.test_mount changes base_url then calls
But if another test calls app.cached_app() first without changing base_url, 
succeeding test_mount fails on Travis.
For example, adding the following test causes test_mount to fail,
whereas test_dummy itself succeeds:

class TestDummy(unittest.TestCase):
    def setUp(self):
        super(TestDummy, self).setUp()
        app = application.cached_app(testing=True)
        self.client = Client(app)

    def test_dummy(self):
        response, _, _ = self.client.get('/', follow_redirects=True)
        resp_html = b''.join(response)
        self.assertIn(b"DAGs", resp_html)

This message was sent by Atlassian JIRA

Reply via email to