# import os
# import sys

# # Adding the parent directory to sys.path
# sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))
# from pkgLavanya.detect_info import find_pattern

# def test_sensitive_info():
#     """Test if the function correctly detects sensitive information."""
#     example_string = "String contains Username"
#     assert (
#         find_pattern(example_string) == False
#     )  # Assuming find_pattern returns True if sensitive information is found


# def test_no_sensitive_info():
#     """Test if the function correctly handles no sensitive information."""
#     example_string = "String does not contain sensitive data"
#     assert find_pattern(example_string) == False


# def test_no_data():
#     """Test if the function handles an empty string."""
#     example_string = " "
#     assert find_pattern(example_string) == False


# i

# import os
# import sys

# # Adding the parent directory to sys.path
# sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))

# from detect_info import find_pattern

# def test_sensitive_info():
#     """Test if the function correctly detects sensitive information."""
#     example_string = "String contains Username"
#     assert find_pattern(example_string) == False

# def test_no_sensitive_info():
#     """Test if the function correctly handles no sensitive information."""
#     example_string = "String does not contain sensitive data"
#     assert find_pattern(example_string) == False

# def test_no_data():
#     """Test if the function handles an empty string."""
#     example_string = " "
#     assert find_pattern(example_string) == False



# import os
# import sys

# sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))
# from detect_info import find_pattern  # Adjust the import path
# def test_sensitive_info():
#     """Test if the function correctly detects sensitive information."""
#     example_string = "String contains Username"
#     assert find_pattern(example_string) == False

# def test_no_sensitive_info():
#     """Test if the function correctly handles no sensitive information."""
#     example_string = "String does not contain sensitive data"
#     assert find_pattern(example_string) == False

# def test_no_data():
#     """Test if the function handles an empty string."""
#     example_string = " "
#     assert find_pattern(example_string) == False



import os
import sys

sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))
from pkgLavanya.detect_info import find_pattern  # Adjust the import path

def test_sensitive_info():
    """Test if the function correctly detects sensitive information."""
    example_string = "String contains Username"
    assert find_pattern(example_string) == True  # Change to True as we want it to detect sensitive info

def test_no_sensitive_info():
    """Test if the function correctly handles no sensitive information."""
    example_string = "String does not contain sensitive data"
    assert find_pattern(example_string) == False

def test_no_data():
    """Test if the function handles an empty string."""
    example_string = " "
    assert find_pattern(example_string) == False
