rename mad_lib
This commit is contained in:
0
1/1.9 Mad Lib/tests/__init__.py
Normal file
0
1/1.9 Mad Lib/tests/__init__.py
Normal file
19
1/1.9 Mad Lib/tests/test_zyBooks.py
Normal file
19
1/1.9 Mad Lib/tests/test_zyBooks.py
Normal file
@@ -0,0 +1,19 @@
|
||||
import unittest
|
||||
from unittest.mock import patch
|
||||
import mad_lib
|
||||
|
||||
|
||||
class zyBooks_Test(unittest.TestCase):
|
||||
|
||||
|
||||
|
||||
|
||||
@patch('builtins.input', return_value=['Eric', 'Chipotle', '12', 'cars'])
|
||||
def test_zyBooks(self, mock_input):
|
||||
result = mad_lib()
|
||||
|
||||
self.assertEqual(result, 6)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
Reference in New Issue
Block a user