MCPcopy
hub / github.com/celery/celery / test_maybe_make_aware

Method test_maybe_make_aware

t/unit/app/test_beat.py:939–946  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

937class test_schedule:
938
939 def test_maybe_make_aware(self):
940 x = schedule(10, app=self.app)
941 x.utc_enabled = True
942 d = x.maybe_make_aware(datetime.now(timezone.utc))
943 assert d.tzinfo
944 x.utc_enabled = False
945 d2 = x.maybe_make_aware(datetime.now(timezone.utc))
946 assert d2.tzinfo
947
948 def test_to_local(self):
949 x = schedule(10, app=self.app)

Callers

nothing calls this directly

Calls 3

scheduleClass · 0.90
maybe_make_awareMethod · 0.80
nowMethod · 0.45

Tested by

no test coverage detected