def test_pythonvalue(self): instance = builtins.gDay() assert instance.pythonvalue('---01') == (1, None) assert instance.pythonvalue('---01Z') == (1, pytz.utc) assert instance.pythonvalue('---01+02:00') == (1, pytz.FixedOffset(120)) assert instance.pythonvalue('---01-04:00') == (1, pytz.FixedOffset(-240)) assert instance.pythonvalue('---15') == (15, None) assert instance.pythonvalue('---31') == (31, None) with pytest.raises(builtins.ParseError): assert instance.pythonvalue('99')
def test_xmlvalue(self): instance = builtins.gDay() value = (1, None) assert instance.xmlvalue(value) == '---01' value = (1, pytz.FixedOffset(120)) assert instance.xmlvalue(value) == '---01+02:00' value = (1, pytz.FixedOffset(-240)) assert instance.xmlvalue(value) == '---01-04:00'