Skip to content

Glossary: Software Design Patterns

Injected clock

Also written: clock

A function with no arguments that returns the current time, passed into code so a test can pass a fixed one. You pass `datetime.now` without brackets.

Where the book teaches it

Related terms

Dependency injectionStub