From a057714295a041843cafcd376b110f839e083424 Mon Sep 17 00:00:00 2001 From: Airah Yusuff Date: Fri, 10 Oct 2025 18:52:31 +0100 Subject: [PATCH 1/3] update fully booked mentor --- _data/mentors.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/_data/mentors.yml b/_data/mentors.yml index b7db38eb..547752bc 100644 --- a/_data/mentors.yml +++ b/_data/mentors.yml @@ -203,7 +203,7 @@ - name: Madhura Chaganty disabled: false matched: false - sort: 200 + sort: 100 hours: 2 type: ad-hoc index: 7 @@ -215,7 +215,7 @@ image: assets/images/mentors/madhura_chaganty.jpeg location: United Kingdom languages: English - availability: [10] + availability: [] skills: experience: 16+ Years years: 16 From a054bae7faa561758c3b611238f34701ba58f421 Mon Sep 17 00:00:00 2001 From: Airah Yusuff Date: Fri, 10 Oct 2025 19:22:05 +0100 Subject: [PATCH 2/3] update tests to match new logic --- tools/tests/download_image_test.py | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/tools/tests/download_image_test.py b/tools/tests/download_image_test.py index 8b583f2f..2763b580 100644 --- a/tools/tests/download_image_test.py +++ b/tools/tests/download_image_test.py @@ -64,25 +64,25 @@ def test_filename_sanitization(self, tmp_path, monkeypatch): class TestRunAutomation: - def test_run_automation_success(self, tmp_path, monkeypatch, capsys): - monkeypatch.setattr(sys, "argv", ["download_image.py", "https://example.com/test.jpg", "Charlie"]) + def test_run_automation_success(self, tmp_path, monkeypatch, caplog): + caplog.set_level("INFO") + monkeypatch.setattr(sys, "argv", ["download_image.py", "samples/mentors.xlsx"]) - fake_path = str(tmp_path / "charlie.jpeg") + fake_path = str(tmp_path / "success-download.jpeg") monkeypatch.setattr(download_image, "download_image", mock.Mock(return_value=fake_path)) download_image.run_automation() - captured = capsys.readouterr() - assert "Image saved to" in captured.out - download_image.download_image.assert_called_once() + assert "Successfully downloaded 2 images." in caplog.text + assert "Image download process completed." in caplog.text - def test_run_automation_failure(self, monkeypatch, capsys): - monkeypatch.setattr(sys, "argv", ["download_image.py", "https://example.com/fail.jpg", "David"]) + def test_run_automation_failure(self, monkeypatch, caplog): + caplog.set_level("INFO") + monkeypatch.setattr(sys, "argv", ["download_image.py", "samples/mentors.xlsx"]) monkeypatch.setattr(download_image, "download_image", mock.Mock(return_value=None)) download_image.run_automation() - captured = capsys.readouterr() - assert "Failed to download the image." in captured.out + assert "Successfully downloaded 0 images." in caplog.text def test_run_automation_no_args(self, monkeypatch, caplog): monkeypatch.setattr(sys, "argv", ["download_image.py"]) @@ -90,4 +90,4 @@ def test_run_automation_no_args(self, monkeypatch, caplog): download_image.run_automation() - assert "Add parameters for download" in caplog.text + assert "Script needs 1 parameter (xlsx_file_path) to run" in caplog.text From d1bdd3da94539bb46870ef5d64fffeafbe177af9 Mon Sep 17 00:00:00 2001 From: Airah Yusuff Date: Fri, 10 Oct 2025 19:25:37 +0100 Subject: [PATCH 3/3] update tests to match new logic --- tools/tests/download_image_test.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/tests/download_image_test.py b/tools/tests/download_image_test.py index 2763b580..1c644a58 100644 --- a/tools/tests/download_image_test.py +++ b/tools/tests/download_image_test.py @@ -66,7 +66,7 @@ def test_filename_sanitization(self, tmp_path, monkeypatch): class TestRunAutomation: def test_run_automation_success(self, tmp_path, monkeypatch, caplog): caplog.set_level("INFO") - monkeypatch.setattr(sys, "argv", ["download_image.py", "samples/mentors.xlsx"]) + monkeypatch.setattr(sys, "argv", ["download_image.py", "tools/samples/mentors.xlsx"]) fake_path = str(tmp_path / "success-download.jpeg") monkeypatch.setattr(download_image, "download_image", mock.Mock(return_value=fake_path)) @@ -78,7 +78,7 @@ def test_run_automation_success(self, tmp_path, monkeypatch, caplog): def test_run_automation_failure(self, monkeypatch, caplog): caplog.set_level("INFO") - monkeypatch.setattr(sys, "argv", ["download_image.py", "samples/mentors.xlsx"]) + monkeypatch.setattr(sys, "argv", ["download_image.py", "tools/samples/mentors.xlsx"]) monkeypatch.setattr(download_image, "download_image", mock.Mock(return_value=None)) download_image.run_automation()