# Path: pagarme/plan.py
# def create(params):
# def find_all():
# def find_by(search_params):
# def update(plan_id, dictionary):
# 
# Path: tests/resources/dictionaries/plan_dictionary.py
# BOLETO_PLAN = {
#     "amount": "10000",
#     "days": "30",
#     "trial_days": "0",
#     "name": "Boleto Plan",
#     "payment_methods": ["boleto"]
# }
# CREDIT_CARD_PLAN = {
#     "amount": "10000",
#     "days": "30",
#     "trial_days": "0",
#     "name": "Credit Card Plan",
#     "payment_methods": ["credit_card"]
# }
# NO_TRIAL_PLAN = {
#     "amount": "10000",
#     "days": "30",
#     "trial_days": "0",
#     "name": "No Trial Plan",
# }
# TRIAL_PLAN = {
#     "amount": "10000",
#     "days": "30",
#     "trial_days": "30",
#     "name": "Trial Plan"
# }
# UPDATE_PLAN = {
#     "trial_days": "7"
# }


from pagarme import plan
from tests.resources.dictionaries import plan_dictionary
import time


def test_create_boleto_plan():
    _plan = plan.create(plan_dictionary.BOLETO_PLAN)
    assert _plan['payment_methods'] == ["boleto"]


def test_create_credit_card_plan():
    _plan = plan.create(plan_dictionary.CREDIT_CARD_PLAN)
    assert _plan['payment_methods'] == ["credit_card"]


def test_create_no_trial_plan():
    _plan = plan.create(plan_dictionary.NO_TRIAL_PLAN)
    assert _plan['trial_days'] == 0


def test_create_trial_plan():

# Path: pagarme/plan.py
# def create(params):
# def find_all():
# def find_by(search_params):
# def update(plan_id, dictionary):
# 
# Path: tests/resources/dictionaries/plan_dictionary.py
# BOLETO_PLAN = {
#     "amount": "10000",
#     "days": "30",
#     "trial_days": "0",
#     "name": "Boleto Plan",
#     "payment_methods": ["boleto"]
# }
# CREDIT_CARD_PLAN = {
#     "amount": "10000",
#     "days": "30",
#     "trial_days": "0",
#     "name": "Credit Card Plan",
#     "payment_methods": ["credit_card"]
# }
# NO_TRIAL_PLAN = {
#     "amount": "10000",
#     "days": "30",
#     "trial_days": "0",
#     "name": "No Trial Plan",
# }
# TRIAL_PLAN = {
#     "amount": "10000",
#     "days": "30",
#     "trial_days": "30",
#     "name": "Trial Plan"
# }
# UPDATE_PLAN = {
#     "trial_days": "7"
# }


# Path: tests/plan_test.py
from pagarme import plan
from tests.resources.dictionaries import plan_dictionary
import time



def test_create_boleto_plan():
    _plan = plan.create(plan_dictionary.BOLETO_PLAN)
    assert _plan['payment_methods'] == ["boleto"]


def test_create_credit_card_plan():
    _plan = plan.create(plan_dictionary.CREDIT_CARD_PLAN)
    assert _plan['payment_methods'] == ["credit_card"]


def test_create_no_trial_plan():
    _plan = plan.create(plan_dictionary.NO_TRIAL_PLAN)
    assert _plan['trial_days'] == 0


def test_create_trial_plan():

    _plan = plan.create(plan_dictionary.TRIAL_PLAN)