HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux spn-python 5.15.0-89-generic #99-Ubuntu SMP Mon Oct 30 20:42:41 UTC 2023 x86_64
User: arjun (1000)
PHP: 8.1.2-1ubuntu2.20
Disabled: NONE
Upload Files
File: //home/arjun/projects/buyercall/buyercall/tests/email/conftest.py
import pytest
import os


ROOT_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
RESOURCE_DIR = os.path.join(ROOT_DIR, 'email/resources')

@pytest.fixture()
def mock_send_mail_data():
    return open(RESOURCE_DIR + '/send.txt').read()

@pytest.fixture()
def mock_delivery_mail_data():
    return open(RESOURCE_DIR + '/delivery.txt').read()

@pytest.fixture()
def mock_receive_mail_data():
    return open(RESOURCE_DIR + '/receive.txt').read()

@pytest.fixture()
def mock_recipients():
    return ['help@baloud.com',]


@pytest.fixture()
def mock_sender():
    return 'email@baloud.com'


@pytest.fixture()
def mock_subject():
    return "Test Subject"


@pytest.fixture()
def mock_plain_body():
    return "This is a plain text email body"


@pytest.fixture()
def mock_html_body():
    return """
    <html><head><title>Hello there</title></head>
    <body>
    This is a html text email body
    </body>
    </html>
    """

@pytest.fixture()
def mock_config_set_name():
    return "1001e251-6d26-40bd-8523-670f611238af-config-set"