diff --git a/pyproject.toml b/pyproject.toml index 3b730417..0d33d71c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -53,4 +53,4 @@ sphinx = "<7.0.0" sphinx-argparse = "0.4.0" sphinx_autodoc_typehints = "1.23.0" sphinx-copybutton = "0.5.2" -sphinx-rtd-theme = "1.2.2" +sphinx-rtd-theme = "1.3.0" diff --git a/tests/account_logic/test_AccountServices.py b/tests/account_logic/test_AccountServices.py index b0b9b02e..b276086a 100644 --- a/tests/account_logic/test_AccountServices.py +++ b/tests/account_logic/test_AccountServices.py @@ -455,40 +455,6 @@ def test_status_unlocked_with_investment_sus_applied(self) -> None: self.assertEqual(900, investment.current_sus) - @patch.object(SlurmAccount, - "get_cluster_usage_per_user", - lambda self, cluster, start, end, in_hours: {'account1': 550, 'account2': 550}) - def test_status_unlocked_with_multiple_investments_disbursements_applied(self) -> None: - """Test that update_status uses investment SUs to cover usage over limits, exhausting the first investment - and withdrawing from a future disbursement of the investment""" - - self.slurm_account.set_locked_state(False, cluster=settings.test_cluster) - - with DBConnection.session() as session: - # Proposal is expired - proposal = session.execute(active_proposal_query).scalars().first() - proposal.allocations[0].service_units_total = 10_000 - proposal.allocations[0].service_units_used = 35_000 - - # Investment is expired - investment = session.execute(active_investment_query).scalars().first() - investment.current_sus = 1000 - investment.withdrawn_sus = 1000 - investment.service_units = 2000 - - session.commit() - - self.account.update_status() - - # cluster should be unlocked due to exceeding usage being covered by investment - self.assertFalse(self.slurm_account.get_locked_state(cluster=settings.test_cluster)) - - with DBConnection.session() as session: - # check that investment SUs were used to cover usage - investment = session.execute(active_investment_query).scalars().first() - - self.assertEqual(900, investment.current_sus) - self.assertEqual(investment.withdrawn_sus, investment.service_units) @patch.object(SlurmAccount, "get_cluster_usage_per_user",