# Path: tests/common.py
# class DummyPostData(dict):
#     def getlist(self, key):
#         v = self[key]
#         if not isinstance(v, (list, tuple)):
#             v = [v]
#         return v


from datetime import date
from tests.common import DummyPostData
from wtforms.fields import MonthField
from wtforms.form import Form




class F(Form):
    a = MonthField()
    b = MonthField(format="%m/%Y")


def test_basic():
    d = date(2008, 5, 1)

# Path: tests/common.py
# class DummyPostData(dict):
#     def getlist(self, key):
#         v = self[key]
#         if not isinstance(v, (list, tuple)):
#             v = [v]
#         return v


# Path: tests/fields/test_month.py
from datetime import date
from tests.common import DummyPostData
from wtforms.fields import MonthField
from wtforms.form import Form





class F(Form):
    a = MonthField()
    b = MonthField(format="%m/%Y")


def test_basic():
    d = date(2008, 5, 1)

    form = F(DummyPostData(a=["2008-05"], b=["05/2008"]))