mirror of
https://github.com/graphql-python/graphene.git
synced 2024-11-29 04:53:55 +03:00
chore: fix test
This commit is contained in:
parent
009bd8994f
commit
b073e85ea3
|
@ -228,22 +228,15 @@ def test_time_query_variable(sample_time):
|
||||||
|
|
||||||
|
|
||||||
def test_support_isoformat():
|
def test_support_isoformat():
|
||||||
isoformat = 20111104
|
isoformat = "2011-11-04T00:05:23Z"
|
||||||
|
|
||||||
# test time variable provided as Python time
|
# test time variable provided as Python time
|
||||||
result = schema.execute(
|
result = schema.execute(
|
||||||
"""query Test($time: Time){ time(at: $time) }""",
|
"""query DateTime($time: DateTime){ datetime(in: $time) }""",
|
||||||
variables={"time": sample_time},
|
variables={"time": isoformat},
|
||||||
)
|
)
|
||||||
assert not result.errors
|
assert not result.errors
|
||||||
assert result.data == {"time": isoformat}
|
assert result.data == {"datetime": "2011-11-04T00:05:23+00:00"}
|
||||||
|
|
||||||
# test time variable in string representation
|
|
||||||
result = schema.execute(
|
|
||||||
"""query Test($time: Time){ time(at: $time) }""", variables={"time": isoformat}
|
|
||||||
)
|
|
||||||
assert not result.errors
|
|
||||||
assert result.data == {"time": isoformat}
|
|
||||||
|
|
||||||
|
|
||||||
def test_bad_variables(sample_date, sample_datetime, sample_time):
|
def test_bad_variables(sample_date, sample_datetime, sample_time):
|
||||||
|
|
Loading…
Reference in New Issue
Block a user