From 38418a0336c22e175e6b707446282d3bdf01e6e1 Mon Sep 17 00:00:00 2001 From: Animesh-Ghosh Date: Wed, 31 Aug 2022 14:30:55 +0530 Subject: [PATCH] Update README with instructions to run tests Updated README with instructions to run the tests. Renamed test file and class. --- README.md | 7 +++++++ test_titles_updater.py => test_get_titles.py | 3 +-- 2 files changed, 8 insertions(+), 2 deletions(-) rename test_titles_updater.py => test_get_titles.py (89%) diff --git a/README.md b/README.md index 26ca621..61788d9 100644 --- a/README.md +++ b/README.md @@ -13,6 +13,13 @@ ![r/developersIndia About widget](https://user-images.githubusercontent.com/34342551/185678556-e4c911c9-fb12-49da-9ca6-8f8ce2ad9b5a.png) +## Tests + +To run the tests, simply run the following command in the Python virtual environment: + +```bash +$ python -m unittest +``` ## Resources diff --git a/test_titles_updater.py b/test_get_titles.py similarity index 89% rename from test_titles_updater.py rename to test_get_titles.py index 1f8114e..89a417d 100644 --- a/test_titles_updater.py +++ b/test_get_titles.py @@ -13,8 +13,7 @@ environ_patcher.start() from main import get_titles -# NOTE: not sure about how exactly update_titles can be tested -class TestTitlesUpdater(unittest.TestCase): +class TestGetTitles(unittest.TestCase): @patch('main.json.load', return_value={'titles': ['foo', 'bar', 'baz']}) def test_get_titles_returns_a_list(self, _): titles = get_titles()