Skip to content

Commit

Permalink
fix datetime field serialization in unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
aaraney committed Jul 10, 2023
1 parent 951c707 commit b43d6b9
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions python/lib/core/dmod/test/test_dataset.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
import unittest
from uuid import uuid4
from ..core.dataset import Dataset, DatasetType
from ..core.meta_data import DataCategory, DataDomain, DataFormat, DiscreteRestriction, TimeRange
from ..core.meta_data import DataCategory, DataDomain, DataFormat, DiscreteRestriction, TimeRange, StandardDatasetIndex
from datetime import datetime, timedelta
from typing import Optional, Union


class TestDataset(unittest.TestCase):

@classmethod
def generate_testing_time_range(cls, begin: Union[str, datetime], length: Optional[timedelta] = None,
pattern: Optional[str] = None) -> TimeRange:
Expand Down Expand Up @@ -68,7 +67,7 @@ def setUp(self) -> None:
"uuid": str(self.example_datasets[i].uuid),
"access_location": 'location_{}'.format(i),
"is_read_only": False,
"created_on": self._created_on, # NOTE: breaking change
"created_on": datetime.strftime(self._created_on, Dataset._SERIAL_DATETIME_STR_FORMAT),
})

def test_factory_init_from_deserialized_json_0_a(self):
Expand Down

0 comments on commit b43d6b9

Please sign in to comment.