# 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 datetime
from tests.common import DummyPostData
from wtforms.fields import TimeField
from wtforms.form import Form




class F(Form):
    a = TimeField()
    b = TimeField(format="%H:%M")


def test_basic():
    d = datetime(2008, 5, 5, 4, 30, 0, 0).time()
    # Basic test with both inputs

# 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_time.py
from datetime import datetime
from tests.common import DummyPostData
from wtforms.fields import TimeField
from wtforms.form import Form





class F(Form):
    a = TimeField()
    b = TimeField(format="%H:%M")


def test_basic():
    d = datetime(2008, 5, 5, 4, 30, 0, 0).time()
    # Basic test with both inputs

    form = F(DummyPostData(a=["4:30"], b=["04:30"]))