import os

from GramAddict.core.utils import is_ad

FIX_DIR = os.path.join(os.path.dirname(os.path.dirname(__file__)), "fixtures")


def test_real_normal_post_is_not_ad():
    """
    Test: Ensures the ad detector correctly ignores a standard organic post.
    """
    xml_path = os.path.join(FIX_DIR, "organic_post.xml")
    with open(xml_path, "r") as f:
        real_xml = f.read()

    assert is_ad(real_xml) is False, "False positive! Normal post detected as ad!"
