You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "Tomasz Urbaszek (Jira)" <ji...@apache.org> on 2019/08/25 14:53:00 UTC

[jira] [Created] (AIRFLOW-5309) Use assert_called_once or has_calls in tests

Tomasz Urbaszek created AIRFLOW-5309:
----------------------------------------

             Summary: Use assert_called_once or has_calls in tests
                 Key: AIRFLOW-5309
                 URL: https://issues.apache.org/jira/browse/AIRFLOW-5309
             Project: Apache Airflow
          Issue Type: Bug
          Components: tests
    Affects Versions: 1.10.4
            Reporter: Tomasz Urbaszek
            Assignee: Tomasz Urbaszek


Using mock.assert_call_with method can result in flaky tests (ex. iterating through dict in python 3.5 which does not store order of elements). That's why it's better to use assert_called_once_with or has_calls methods.



--
This message was sent by Atlassian Jira
(v8.3.2#803003)