Skip to content

Commit b0650a6

Browse files
Update daprdocs/content/en/python-sdk-docs/python-actor.md
Co-authored-by: Elena Kolevska <[email protected]> Signed-off-by: Lorenzo Curcio <[email protected]>
1 parent ef74591 commit b0650a6

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

daprdocs/content/en/python-sdk-docs/python-actor.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -81,14 +81,14 @@ assert mockactor._state_manager._mock_state == 5 #True
8181
```
8282
Mock actors are created by passing your actor class and an actor ID (a string) to the create_mock_actor function. This function returns an instance of the actor with many internal methods overridden. Instead of interacting with Dapr for tasks like saving state or managing timers, the mock actor uses in-memory state to simulate these behaviors.
8383

84-
Those variables are:
85-
* **_state_manager._mock_state()**
86-
A [str, object] dict where all the actor state is stored. Any variable saved via _state_manager.save_state(key, value), or any other statemanager method is stored in the dict as that key, value combo. Any value loaded via try_get_state or any other statemanager method is taken from this dict.
84+
This state can be accessed through the following variables:
85+
- **_state_manager._mock_state()**
86+
A `[str, object]` dict where all the actor state is stored. Any variable saved via `_state_manager.save_state(key, value)`, or any other statemanager method is stored in the dict as that key, value pair. Any value loaded via `try_get_state` or any other statemanager method is taken from this dict.
8787

88-
* **_state_manager._mock_timers()**
89-
A [str, ActorTimerData] dict which holds the active actor timers. Any actor method which would add or remove a timer adds or pops the appropriate ActorTimerData object from this dict.
88+
- **_state_manager._mock_timers()**
89+
A `[str, ActorTimerData]` dict which holds the active actor timers. Any actor method which would add or remove a timer adds or pops the appropriate `ActorTimerData` object from this dict.
9090

91-
* **_state_manager._mock_reminders()**
91+
- **_state_manager._mock_reminders()**
9292
A [str, ActorReminderData] dict which holds the active actor reminders. Any actor method which would add or remove a timer adds or pops the appropriate ActorReminderData object from this dict.
9393

9494
**Note: The timers and reminders will never actually trigger. The dictionaries exist only so methods that should add or remove timers/reminders can be tested. If you need to test the callbacks they should activate, you should call them directly with the appropriate values:**

0 commit comments

Comments
 (0)