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"