'Test if aware datetime.datetime objects are converted into GMT.'

@pytest.mark.parametrize('tz', (('UTC', 0), ('PST', (-8)), ('KST', 9)))
def test_jsonify_aware_datetimes(self, tz):

    tzinfo = FixedOffset(hours=tz[1], name=tz[0])
    dt = datetime.datetime(2017, 1, 1, 12, 34, 56, tzinfo=tzinfo)
    gmt = FixedOffset(hours=0, name='GMT')
    expected = dt.astimezone(gmt).strftime('"%a,    %d    %b    %Y    %H:%M:%S    %Z"')
    assert (flask.json.JSONEncoder().encode(dt) == expected)
