testing

testing is a cursor rule for Cursor from kequach/uniqlo-sales-alerter. It costs 0 tokens per session (507 once invoked), scanned A, original, MIT.

A set of project-specific testing rules for a sales-alert application. It defines shared test helpers, country configurations, and representative end-to-end cases.

In plain words
What is it for?
Use it when writing or reviewing unit and end-to-end tests for the application's sale-fetching, filtering, notifications, and country-specific client behavior.
Why use it?
It prevents tests from creating inconsistent objects, using unsuitable country settings, or repeating equivalent cases. End-to-end testing checks complete workflows across representative configurations.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/.

Good fit Use it when writing or reviewing unit and end-to-end tests for the application's sale-fetching, filtering, notifications, and country-specific client behavior.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/kequach/uniqlo-sales-alerter/testing
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/kequach/uniqlo-sales-alerter

Made for: Cursor.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for testing

README.md
[![agentmods](https://agentmods.dev/badge/rules/kequach/uniqlo-sales-alerter/testing.svg)](https://agentmods.dev/rules/kequach/uniqlo-sales-alerter/testing)
Your own site
<a href="https://agentmods.dev/rules/kequach/uniqlo-sales-alerter/testing"><img src="https://agentmods.dev/badge/rules/kequach/uniqlo-sales-alerter/testing.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Nothing until a file matches its globs; then the whole rule loads.
When invoked 507 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00000 $0.00507
Opus 5 $0.00000 $0.00253
Sonnet 5 $0.00000 $0.00101
Haiku 4.5 $0.00000 $0.00051

Measured 7d ago against content hash 10ae9f901478, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

testing scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 7d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.cursor/rules/testing.mdc · 38 lines

What it actually says

Testing Conventions

Fixtures and helpers

  • Use sample_deal(**overrides) from conftest.py to build SaleItem objects. Never construct SaleItem(...) manually in tests.
  • Use _make_email_cfg(**overrides) for EmailChannelConfig in notification tests.
  • Use noop_verify() and noop_watched_fetch() from conftest to isolate filter/check tests from stock verification.
  • Use the module-level _mock_v3_empty() in test_uniqlo_client.py for v3 endpoint mocks.

Country configs in client tests

  • Tests for fetch_sale_products must use a country whose CountryCapabilities.listing_sources include the endpoints being tested:
    • v5 discount only: de/de
    • v5 discount + limitedOffer: id/en
    • v3 + v5 mix: th/en
    • sale_paths: sg/en (with sale_paths configured)

E2E country representatives

  • The e2e sweep tests one representative per distinct CountryCapabilities combination (listing_sources × stock_api × url_style). Countries within the same group share identical pipeline code paths.
    • de/de — v5_disc only, stock_api=v5, display_code URLs (covers uk, fr, es, it, be, nl, dk, se, au, in, kr)
    • id/en — v5_disc + v5_ltd, stock_api=v5, display_code URLs (covers vn, my, us, ca, jp)
    • ph/en — v3_disc + v3_ltd, stock_api=none, code URLs
    • th/en — v5_ltd + v3_disc + v3_ltd, stock_api=none, code URLs
    • sg/en — v5_disc + sale_paths, stock_api=v5, display_code URLs
  • When adding a new country, check if its capabilities match an existing group. If not, add a new representative to _REPRESENTATIVE_COUNTRIES in test_e2e_html_preview.py.

Parametrize over copy-paste

  • When 3+ tests follow the same pattern with different inputs, use @pytest.mark.parametrize.
  • Example: SMTP error tests are parametrized, not duplicated.
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 7d ago First seen · 38 lines · 0 tokens per session scan A 10ae9f901478

Subscribe to this mod's changes

testing is a cursor rule published in the GitHub repository kequach/uniqlo-sales-alerter (30 stars, last pushed 17d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 507 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-01.