repository.get_by_id.return_value = expected_employee # Configures the mock to return a particular employee. service = EmployeeService(repository) # Injects the mock repository into the service.
# Below we have some code that makes a list of specific letters found in any string. If you run it, you can see what it does. # From the output, you can see that the `LetterCompiler( )` function finds ...