You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+11Lines changed: 11 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -144,6 +144,17 @@ Stubbing and verification of a decoy are **mutually exclusive** within a test. I
144
144
- The assertions are redundant
145
145
- The dependency is doing too much based on its input (e.g. side-effecting _and_ calculating complex data) and should be refactored
146
146
147
+
#### Verifying order of multiple calls
148
+
149
+
If your code under test must call several dependencies in order, you may pass multiple rehearsals to `verify`. Decoy will search through the list of all calls made to the given spies and look for the exact rehearsal sequence given, in order.
150
+
151
+
```python
152
+
decoy.verify(
153
+
handler.call_first_procedure("hello"),
154
+
handler.call_second_procedure("world"),
155
+
)
156
+
```
157
+
147
158
### Usage with async/await
148
159
149
160
Decoy supports async/await out of the box! Pass your async function or class with async methods to `spec` in `decoy.create_decoy_func` or `decoy.create_decoy`, respectively, and Decoy will figure out the rest.
0 commit comments