# Path: openprocurement/tender/openeu/constants.py
# TENDERING_DAYS = 30
# 
# TENDERING_DURATION = timedelta(days=TENDERING_DAYS)
# 
# QUESTIONS_STAND_STILL = timedelta(days=10)
# 
# COMPLAINT_STAND_STILL = timedelta(days=10)


import os
from datetime import datetime, timedelta
from openprocurement.api.constants import SANDBOX_MODE
from openprocurement.tender.openua.tests.base import (
    BaseTenderUAWebTest as BaseBaseTenderWebTest
)
from openprocurement.api.utils import apply_data_patch, get_now
from openprocurement.tender.openeu.constants import (
    TENDERING_DAYS,
    TENDERING_DURATION,
    QUESTIONS_STAND_STILL,
    COMPLAINT_STAND_STILL
)
                    "startDate": (now - TENDERING_DURATION - COMPLAINT_STAND_STILL).isoformat(),
                    "endDate": (now - COMPLAINT_STAND_STILL - TENDERING_DURATION + QUESTIONS_STAND_STILL).isoformat()
                },
                "tenderPeriod": {
                    "startDate": (now - TENDERING_DURATION - COMPLAINT_STAND_STILL).isoformat(),
                    "endDate": (now - COMPLAINT_STAND_STILL).isoformat()
                },
                "qualificationPeriod": {
                    "startDate": (now - COMPLAINT_STAND_STILL).isoformat(),
                    "endDate": (now).isoformat()
                }
            })
            if 'lots' in tender and tender['lots']:
                data['lots'] = []
                for index, lot in enumerate(tender['lots']):
                    lot_data = {'id': lot['id']}
                    if lot['status'] == 'active':
                        lot_data["auctionPeriod"] = {
                            "startDate": (now).isoformat()
                        }
                    data['lots'].append(lot_data)
            else:
                data.update({
                    "auctionPeriod": {
                        "startDate": now.isoformat()
                    }
                })
        elif status == 'complete':
            data.update({
                "enquiryPeriod": {

# Path: openprocurement/tender/openeu/constants.py
# TENDERING_DAYS = 30
# 
# TENDERING_DURATION = timedelta(days=TENDERING_DAYS)
# 
# QUESTIONS_STAND_STILL = timedelta(days=10)
# 
# COMPLAINT_STAND_STILL = timedelta(days=10)


# Path: openprocurement/tender/openeu/tests/base.py
import os
from datetime import datetime, timedelta
from openprocurement.api.constants import SANDBOX_MODE
from openprocurement.tender.openua.tests.base import (
    BaseTenderUAWebTest as BaseBaseTenderWebTest
)
from openprocurement.api.utils import apply_data_patch, get_now
from openprocurement.tender.openeu.constants import (
    TENDERING_DAYS,
    TENDERING_DURATION,
    QUESTIONS_STAND_STILL,
    COMPLAINT_STAND_STILL
)

                    "startDate": (now - TENDERING_DURATION - COMPLAINT_STAND_STILL).isoformat(),
                    "endDate": (now - COMPLAINT_STAND_STILL - TENDERING_DURATION + QUESTIONS_STAND_STILL).isoformat()
                },
                "tenderPeriod": {
                    "startDate": (now - TENDERING_DURATION - COMPLAINT_STAND_STILL).isoformat(),
                    "endDate": (now - COMPLAINT_STAND_STILL).isoformat()
                },
                "qualificationPeriod": {
                    "startDate": (now - COMPLAINT_STAND_STILL).isoformat(),
                    "endDate": (now).isoformat()
                }
            })
            if 'lots' in tender and tender['lots']:
                data['lots'] = []
                for index, lot in enumerate(tender['lots']):
                    lot_data = {'id': lot['id']}
                    if lot['status'] == 'active':
                        lot_data["auctionPeriod"] = {
                            "startDate": (now).isoformat()
                        }
                    data['lots'].append(lot_data)
            else:
                data.update({
                    "auctionPeriod": {
                        "startDate": now.isoformat()
                    }
                })
        elif status == 'complete':
            data.update({
                "enquiryPeriod": {

                    "startDate": (now - TENDERING_DURATION - COMPLAINT_STAND_STILL - timedelta(days=3)).isoformat(),