menu_book Course Curriculum (Software Testing) expand_more
Testing Fundamentals
Assertions & Fixtures
Test Doubles & Dependencies
Coverage & Quality
API & Web Testing
test data factory
Learn test data factory in Software Testing with a dedicated explanation, a concept-specific example, practical cautions, and a mastery check.
12 min read
•
Beginner
Advertisement
software-testing-014.py
python
def make_user(**overrides):
data={'id':1,'name':'Test User','active':True}; data.update(overrides); return data
def test_inactive_user(): assert make_user(active=False)['active'] is False
What to watch
Content source & attribution
Original Syntaxis Content · Original Syntaxis Content