MCPcopy Index your code
hub / github.com/encode/django-rest-framework / test_encode_time

Method test_encode_time

tests/test_encoders.py:44–49  ·  view source on GitHub ↗

Tests encoding a timezone

(self)

Source from the content-addressed store, hash-verified

42 assert self.encoder.default(current_time_utc) == current_time.isoformat() + 'Z'
43
44 def test_encode_time(self):
45 """
46 Tests encoding a timezone
47 """
48 current_time = datetime.now().time()
49 assert self.encoder.default(current_time) == current_time.isoformat()
50
51 def test_encode_time_tz(self):
52 """

Callers

nothing calls this directly

Calls 1

defaultMethod · 0.80

Tested by

no test coverage detected