Fixture to test both the old/deprecated `copy` and new `model_copy` methods.
(request)
| 126 | |
| 127 | @pytest.fixture(params=['copy', 'model_copy']) |
| 128 | def copy_method(request): |
| 129 | """ |
| 130 | Fixture to test both the old/deprecated `copy` and new `model_copy` methods. |
| 131 | """ |
| 132 | if request.param == 'copy': |
| 133 | return deprecated_copy |
| 134 | else: |
| 135 | |
| 136 | def new_copy_method(m, *, update=None, deep=False): |
| 137 | return m.model_copy(update=update, deep=deep) |
| 138 | |
| 139 | return new_copy_method |
| 140 | |
| 141 | |
| 142 | def test_simple_copy(copy_method): |
no outgoing calls
no test coverage detected