Skip to content

Commit

Permalink
fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
keegansmith21 committed Jun 5, 2024
1 parent eff8dee commit 2f26b7d
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions observatory_platform/tests/test_date_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,18 @@ def test_pendulum_inputs(self):
self.assertEqual(expected_output, actual_output)

def test_missing_tz(self):
inputs = ["2024-01-01 00:00:00", "2024-01-01T12:00:00", datetime(2024, 1, 1, 12, 0, 0), pendulum.datetime(2024, 1, 1, 12, 0, 0)]
expected_outputs = ["2024-01-01T00:00:00+00:00", "2024-01-01T12:00:00+00:00", "2024-01-01T12:00:00+00:00", "2024-01-01T12:00:00+00:00"]
inputs = [
"2024-01-01 00:00:00",
"2024-01-01T12:00:00",
datetime(2024, 1, 1, 12, 0, 0),
pendulum.datetime(2024, 1, 1, 12, 0, 0),
]
expected_outputs = [
"2024-01-01T00:00:00+00:00",
"2024-01-01T12:00:00+00:00",
"2024-01-01T12:00:00+00:00",
"2024-01-01T12:00:00+00:00",
]
for input, expected_output in zip(inputs, expected_outputs):
actual_output = datetime_normalise(input)
self.assertEqual(expected_output, actual_output)

0 comments on commit 2f26b7d

Please sign in to comment.