Home / Function/ test_detect_valid_credit_card() — langchain Function Reference

test_detect_valid_credit_card() — langchain Function Reference

Architecture documentation for the test_detect_valid_credit_card() function in test_pii.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  1862d357_0153_23f2_690d_46c8836db9a3["test_detect_valid_credit_card()"]
  6c7a1b0c_679a_9f4c_e9a9_c33205da0105["TestCreditCardDetection"]
  1862d357_0153_23f2_690d_46c8836db9a3 -->|defined in| 6c7a1b0c_679a_9f4c_e9a9_c33205da0105
  style 1862d357_0153_23f2_690d_46c8836db9a3 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/langchain_v1/tests/unit_tests/agents/middleware/implementations/test_pii.py lines 64–71

    def test_detect_valid_credit_card(self) -> None:
        # Valid Visa test number
        content = "Card: 4532015112830366"
        matches = detect_credit_card(content)

        assert len(matches) == 1
        assert matches[0]["type"] == "credit_card"
        assert matches[0]["value"] == "4532015112830366"

Domain

Subdomains

Frequently Asked Questions

What does test_detect_valid_credit_card() do?
test_detect_valid_credit_card() is a function in the langchain codebase, defined in libs/langchain_v1/tests/unit_tests/agents/middleware/implementations/test_pii.py.
Where is test_detect_valid_credit_card() defined?
test_detect_valid_credit_card() is defined in libs/langchain_v1/tests/unit_tests/agents/middleware/implementations/test_pii.py at line 64.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free