# Mock

*noun*

say it: **“MOK”** **/ˈmɑk/**

In testing, a stand-in object that takes the place of a real one and records how it was called, so a test can check, say, that an email was sent.

## What is **Mock**?

A **mock** is a stand-in object that records how it was called, so a test can check that code, for example, sent an email.

## In a sentence

- “The test used a **mock** mailer and checked it was called once.”
- “This course tests against a real SQLite file instead of a **mock** database.”

Level: Journeyman · [More Unit Testing terms at this level](https://www.ask-codey.com/glossary?category=unit-testing&level=3)

Updated: November 19, 2026

Source: https://www.ask-codey.com/glossary/mock
