コード例 #1
0
ファイル: test_services.py プロジェクト: ibivibiv/thermal
    def test_edge_detect_calls_expected_methods_for_tight(
            self, as_edge_detect_with_canny_limits, as_edge_detect_auto,
            as_get_document_with_exception):
        as_get_document_with_exception.return_value = {'some': 'thing'}

        ans.edge_detect('123', detection_threshold='tight')

        as_get_document_with_exception.assert_called_once_with(
            '123', 'picture')
        as_edge_detect_auto.assert_not_called()
        call_one = call('123', {'some': 'thing'}, ANY, 225, 250)
        as_edge_detect_with_canny_limits.assert_has_calls([call_one])