diff --git a/graphene/types/tests/test_datetime.py b/graphene/types/tests/test_datetime.py index 05dca4a5..c19edad2 100644 --- a/graphene/types/tests/test_datetime.py +++ b/graphene/types/tests/test_datetime.py @@ -54,3 +54,18 @@ def test_datetime_query_variable(): assert result.data == { 'datetime': isoformat } + + +def test_time_query_variable(): + now = datetime.datetime.now().replace(tzinfo=pytz.utc) + time = datetime.time(now.hour, now.minute, now.second, now.microsecond, now.tzinfo) + isoformat = time.isoformat() + + result = schema.execute( + '''query Test($date: Time){ time(at: $time) }''', + variable_values={'time': isoformat} + ) + assert not result.errors + assert result.data == { + 'time': isoformat + }