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

Method test_encode_date

tests/test_encoders.py:60–65  ·  view source on GitHub ↗

Tests encoding a date object

(self)

Source from the content-addressed store, hash-verified

58 self.encoder.default(current_time)
59
60 def test_encode_date(self):
61 """
62 Tests encoding a date object
63 """
64 current_date = date.today()
65 assert self.encoder.default(current_date) == current_date.isoformat()
66
67 def test_encode_timedelta(self):
68 """

Callers

nothing calls this directly

Calls 1

defaultMethod · 0.80

Tested by

no test coverage detected