"""Tests for ows_moneyhub module.""" from unittest.mock import patch from src.connectors.ows_moneyhub import OwsMoneyhub @patch('src.connectors.ows_service.OwsService.get') def test_get_account_activity(mock_owsservice): """Test fetching account activity.""" account_id = 24601 path = f'/account/{account_id}/activity' OwsMoneyhub.get_account_activity(account_id) mock_owsservice.assert_called_with(path) @patch('src.connectors.ows_service.OwsService.get') def test_get_report_custom(mock_owsservice): """Test to fetch statement attachments.""" report_custom_id = 42 path = f'/reports/custom/{report_custom_id}' OwsMoneyhub.get_report_custom(report_custom_id) mock_owsservice.assert_called_with(path) @patch('src.connectors.ows_service.OwsService.put') def test_update_report_custom(mock_owsservice): """Test to update custom report.""" report_custom_id = 1 path = f'/reports/custom/{report_custom_id}' body = { 'file_location': 's3://filename.csv', 'report_custom_status': 'complete', } OwsMoneyhub.update_report_custom(report_custom_id, **body) mock_owsservice.assert_called_with(path, **body)