MCPcopy
hub / github.com/YelpArchive/elastalert / utcnow

Method utcnow

tests/util_test.py:41–42  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

39 class MockDatetime(datetime):
40 @staticmethod
41 def utcnow():
42 return dt('2017-07-07T10:00:00.000Z')
43
44 with mock.patch('datetime.datetime', MockDatetime):
45 assert parse_deadline(spec) == expected_deadline

Callers 6

test_silenceFunction · 0.80
test_silence_query_keyFunction · 0.80
test_realertFunction · 0.80
startMethod · 0.80
handle_rule_executionMethod · 0.80
ts_nowFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected