diff --git a/src/coldfront_plugin_cloud/tests/unit/test_calculate_quota_unit_hours.py b/src/coldfront_plugin_cloud/tests/unit/test_calculate_quota_unit_hours.py index e9f8b3d..f779e82 100644 --- a/src/coldfront_plugin_cloud/tests/unit/test_calculate_quota_unit_hours.py +++ b/src/coldfront_plugin_cloud/tests/unit/test_calculate_quota_unit_hours.py @@ -178,7 +178,6 @@ def test_new_allocation_quota_never_approved(self): ) self.assertEqual(value, 0) - @unittest.expectedFailure def test_change_request_decrease(self): """Test for when a change request decreases the quota""" self.resource = self.new_openshift_resource( @@ -267,7 +266,6 @@ def test_change_request_increase(self): ) self.assertEqual(value, 384) - @unittest.expectedFailure def test_change_request_decrease_multiple(self): """Test for when multiple different change request decreases the quota""" self.resource = self.new_openshift_resource( diff --git a/src/coldfront_plugin_cloud/utils.py b/src/coldfront_plugin_cloud/utils.py index 4dc7420..cabda75 100644 --- a/src/coldfront_plugin_cloud/utils.py +++ b/src/coldfront_plugin_cloud/utils.py @@ -124,7 +124,7 @@ def calculate_quota_unit_hours(allocation: Allocation, # find one that happened just before the next event. cr_created_at = cr.history.first().created if cr.history.first().created <= event_time: - if unbounded_last_event_time and unbounded_last_event_time < cr_created_at: + if unbounded_last_event_time and unbounded_last_event_time > cr_created_at: # But after the unbounded last event time. continue