def METHOD_NAME(self):
    now = time_now()
    assert isinstance(now, str)
    tests = {
        datetime(
            2019, 5, 17, 20, 51, 19, 519437, tzinfo=timezone.utc
        ): "2019-05-17T20:51:19.519437Z",
        now: now,
    }
    for datetime_val, expected in tests.items():
        assert datetime_to_str(datetime_val) == expected