Skip to content
Snippets Groups Projects
Commit ce3e5365 authored by florian's avatar florian
Browse files

TST: Correct timezone in test, imporve millisecond test

parent 9c131ee1
No related branches found
No related tags found
1 merge request!22Release 0.3
......@@ -34,7 +34,7 @@ from caosadvancedtools.crawler import FileCrawler
from caosadvancedtools.example_cfood import ExampleCFood
from caosdb.common.models import _parse_single_xml_element
from lxml import etree
from datetime import datetime
from datetime import datetime, timezone
PATTERN = "h.*"
......@@ -233,13 +233,13 @@ class InsertionTest(unittest.TestCase):
2020, 1, 1, 15, 0), to_be_updated=to_be_updated)
assert len(to_be_updated) == 1
rec = _parse_single_xml_element(etree.fromstring(
entity_xml.format("2020-01-01T00:00:00.000")))
entity_xml.format("2020-01-01T00:00:00.0")))
assure_has_property(entity=rec, name="TestDate", value=datetime(
2020, 1, 1), to_be_updated=to_be_updated)
rec = _parse_single_xml_element(etree.fromstring(
entity_xml.format("2020-01-01T00:00:00.000+0100")))
entity_xml.format("2020-01-01T00:00:00.000+0000")))
assure_has_property(entity=rec, name="TestDate", value=datetime(
2020, 1, 1), to_be_updated=to_be_updated)
2020, 1, 1, tzinfo=timezone.utc), to_be_updated=to_be_updated)
assert len(to_be_updated) == 1
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment