Control: forwarded -1 https://github.com/encode/django-rest-framework/issues/8160 Control: tags -1 upstream
Hi, Am Tue, Sep 14, 2021 at 09:14:46PM +0200 schrieb Paul Gevers: ... > _____ > TestNaiveDayLightSavingTimeTimeZoneDateTimeField.test_invalid_inputs _____ > > self = > <tests.test_fields.TestNaiveDayLightSavingTimeTimeZoneDateTimeField > object at 0x7fe05e8d3b80> > > def test_invalid_inputs(self): > """ > Ensure that invalid values raise the expected validation error. > """ > for input_value, expected_failure in get_items(self.invalid_inputs): > with pytest.raises(serializers.ValidationError) as exc_info: > self.field.run_validation(input_value) > > assert exc_info.value.detail == expected_failure, \ > 'input value: {}'.format(repr(input_value)) > E AssertionError: input value: '2017-03-12T02:30:00' > E assert [ErrorDetail(...de='invalid')] == ['Invalid > dat...a/New_York".'] > E At index 0 diff: ErrorDetail(string='Datetime has wrong > format. Use one of these formats instead: > YYYY-MM-DDThh:mm[:ss[.uuuuuu]][+HH:MM|-HH:MM|Z].', code='invalid') != > 'Invalid datetime for the timezone "America/New_York".' > E Use -v to get the full diff > there is an upstream issue opened which seems to be the same topic. https://github.com/encode/django-rest-framework/issues/8160 Regards Carsten