Skip to content

Commit

Permalink
Fix Date assertion failure in CI errata:e2e (#13121)
Browse files Browse the repository at this point in the history
* Date fix for CI

* Parse datetime, account for most formats
  • Loading branch information
damoore044 authored Nov 20, 2023
1 parent cd2d2b0 commit 977e6f3
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions tests/foreman/ui/test_errata.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

from airgun.session import Session
from broker import Broker
from dateutil.parser import parse
from fauxfactory import gen_string
from manifester import Manifester
from nailgun import entities
Expand Down Expand Up @@ -286,8 +287,6 @@ def test_end_to_end(
'cves': 'N/A',
'type': 'Security Advisory',
'severity': 'N/A',
'issued': 'January 27, 2012 at 12:00 AM',
'last_updated_on': 'January 27, 2012 at 12:00 AM',
'reboot_suggested': 'No',
'topic': '',
'description': 'Sea_Erratum',
Expand Down Expand Up @@ -334,8 +333,8 @@ def test_end_to_end(
assert (
not ERRATA_DETAILS.items() - errata['details'].items()
), 'Errata details do not match expected values.'
assert errata['details']['issued'] == ERRATA_DETAILS['issued']
assert errata['details']['last_updated_on'] == ERRATA_DETAILS['last_updated_on']
assert parse(errata['details']['issued']) == parse('2012-01-27 12:00:00 AM')
assert parse(errata['details']['last_updated_on']) == parse('2012-01-27 12:00:00 AM')
assert set(errata['packages']['independent_packages']) == set(
ERRATA_PACKAGES['independent_packages']
)
Expand Down

0 comments on commit 977e6f3

Please sign in to comment.