Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix integration tests #3953

Merged
merged 4 commits into from
Sep 29, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -906,7 +906,7 @@ def _snapshot_and_assert_invalidated(self):
for result in snapshotted[10:]:
# result is a tuple, the dbt_valid_to column is the latest
self.assertIsInstance(result[-1], datetime)
self.assertGreaterEqual(result[-1].astimezone(pytz.UTC), self._invalidated_snapshot_datetime)
self.assertGreaterEqual(result[-1].replace(tzinfo=pytz.UTC), self._invalidated_snapshot_datetime)

def _revive_records(self):
database = self.default_database
Expand Down Expand Up @@ -946,7 +946,7 @@ def _snapshot_and_assert_revived(self):
for result in invalidated_records:
# result is a tuple, the dbt_valid_to column is the latest
self.assertIsInstance(result[1], datetime)
self.assertGreaterEqual(result[1].astimezone(pytz.UTC), self._invalidated_snapshot_datetime)
self.assertGreaterEqual(result[1].replace(tzinfo=pytz.UTC), self._invalidated_snapshot_datetime)

# records which weren't revived (id != 10, 11)
revived_records = self.run_sql(
Expand All @@ -968,5 +968,5 @@ def _snapshot_and_assert_revived(self):
self.assertIsInstance(result[1], datetime)
# there are milliseconds (part of microseconds in datetime objects) in the
# invalidated_snapshot_datetime and not in result datetime so set the microseconds to 0
self.assertGreaterEqual(result[1].astimezone(pytz.UTC), self._invalidated_snapshot_datetime.replace(microsecond=0))
self.assertGreaterEqual(result[1].replace(tzinfo=pytz.UTC), self._invalidated_snapshot_datetime.replace(microsecond=0))
self.assertIsNone(result[2])