Skip to content

Instantly share code, notes, and snippets.

View thunpm2's full-sized avatar

thunpm2

  • Joined Mar 29, 2025
View GitHub Profile
@thunpm2
thunpm2 / test_lead_service.py
Last active March 29, 2025 23:01
Lab Unit test
import pytest
from unittest.mock import MagicMock
from lead_service import LeadService, ValidationException
@pytest.fixture
def mock_dependencies():
lead_repo = MagicMock()
sales_agent_repo = MagicMock()
@thunpm2
thunpm2 / CHECKLIST.md
Created April 4, 2025 05:50
Exam Unit test

1. Order Class

  • Test should create order with correct initial values

2. APIResponse Class

  • Test should create api response with correct initial values

3. CSVFileWriter Class

  • Test should return true when write to file success
  • Test should return false when write to file fails