Tests encoding a timezone aware timestamp
(self)
| 49 | assert self.encoder.default(current_time) == current_time.isoformat() |
| 50 | |
| 51 | def test_encode_time_tz(self): |
| 52 | """ |
| 53 | Tests encoding a timezone aware timestamp |
| 54 | """ |
| 55 | current_time = datetime.now().time() |
| 56 | current_time = current_time.replace(tzinfo=utc) |
| 57 | with pytest.raises(ValueError): |
| 58 | self.encoder.default(current_time) |
| 59 | |
| 60 | def test_encode_date(self): |
| 61 | """ |