mirror of
https://github.com/developersIndia/deviras.git
synced 2024-12-22 16:19:50 +05:30
Update README with instructions to run tests
Updated README with instructions to run the tests. Renamed test file and class.
This commit is contained in:
parent
04445c24c2
commit
38418a0336
@ -13,6 +13,13 @@
|
|||||||
|
|
||||||
![r/developersIndia About widget](https://user-images.githubusercontent.com/34342551/185678556-e4c911c9-fb12-49da-9ca6-8f8ce2ad9b5a.png)
|
![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
|
## Resources
|
||||||
|
|
||||||
|
@ -13,8 +13,7 @@ environ_patcher.start()
|
|||||||
|
|
||||||
from main import get_titles
|
from main import get_titles
|
||||||
|
|
||||||
# NOTE: not sure about how exactly update_titles can be tested
|
class TestGetTitles(unittest.TestCase):
|
||||||
class TestTitlesUpdater(unittest.TestCase):
|
|
||||||
@patch('main.json.load', return_value={'titles': ['foo', 'bar', 'baz']})
|
@patch('main.json.load', return_value={'titles': ['foo', 'bar', 'baz']})
|
||||||
def test_get_titles_returns_a_list(self, _):
|
def test_get_titles_returns_a_list(self, _):
|
||||||
titles = get_titles()
|
titles = get_titles()
|
Loading…
Reference in New Issue
Block a user